fix: hide direct-only abilities from the adapter meta-tools
This commit is contained in:
@@ -85,7 +85,13 @@ final class AbilityRegistrar
|
||||
'meta' => [
|
||||
'annotations' => $ability->annotations(),
|
||||
'show_in_rest' => false,
|
||||
'mcp' => ['public' => true, 'type' => 'tool'],
|
||||
// mcp.public only governs the adapter's meta-tools (discover/get-info/execute);
|
||||
// direct tools are listed on the server explicitly. Direct-only abilities
|
||||
// (image/resource results) would not work through execute, so hide them there.
|
||||
'mcp' => [
|
||||
'public' => ! in_array($ability->name(), ExposurePolicy::DIRECT_ONLY, true),
|
||||
'type' => 'tool',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user