-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
[Priority] HighEssential focuses for workEssential focuses for work
Milestone
Description
Summary
The mcp-adapter needs to properly convert abilities-api annotations to the https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations format.
Currently, the conversion in RegisterAbilityAsMcpTool passes through annotations unchanged, which doesn't match the MCP field naming requirements.
Current State
The abilities-api currently defines annotations in WP_Ability::$default_annotations (class-wp-ability.php:38-53):
array(
'instructions' => '', // string: Instructions on how to use the ability
'readonly' => false, // bool: Ability does not modify environment
'destructive' => true, // bool: May perform destructive updates
'idempotent' => false, // bool: Same arguments have no additional effect
)MCP ToolAnnotations Specification
According to the MCP specification, ToolAnnotations should be:
interface ToolAnnotations {
destructiveHint?: boolean; // Default: true
idempotentHint?: boolean; // Default: false
readOnlyHint?: boolean; // Default: false
}Questions to Resolve
- Instructions field: The instructions field has no equivalent in MCP ToolAnnotations. MCP uses the tool description field for instructions. Should we:
- Prepend the instructions to the MCP tool description?
- Ignore the instructions field entirely?
- Pass it as a non-standard annotation field (may cause validation issues)?
- I presume we want all other annotations to be passed to MCP unchanged?
Metadata
Metadata
Assignees
Labels
[Priority] HighEssential focuses for workEssential focuses for work
Type
Projects
Status
No status