Skip to content

Add granular MCP tool annotations for destructive and idempotent hints#15

Merged
wpscholar merged 1 commit into
mainfrom
codex/task-tool-names
Jul 7, 2026
Merged

Add granular MCP tool annotations for destructive and idempotent hints#15
wpscholar merged 1 commit into
mainfrom
codex/task-tool-names

Conversation

@wpscholar

Copy link
Copy Markdown
Member

Refactor Abilities to separate core annotations (readonly, destructive, idempotent) from MCP protocol hints (readOnlyHint, destructiveHint, idempotentHint), and expose both via a new meta_annotations field.

Add an optional $annotations parameter to add_ability() so callers can override defaults per-tool. Apply destructive=true and idempotent=true to delete operations across all tool files, and idempotent=true to update/activate/save operations where appropriate.

Extend tests/run.php to assert correct annotation values on both MCP tool hints and registered ability meta.

Refactor Abilities to separate core annotations (readonly, destructive, idempotent) from MCP protocol hints (readOnlyHint, destructiveHint, idempotentHint), and expose both via a new meta_annotations field.

Add an optional $annotations parameter to add_ability() so callers can override defaults per-tool. Apply destructive=true and idempotent=true to delete operations across all tool files, and idempotent=true to update/activate/save operations where appropriate.

Extend tests/run.php to assert correct annotation values on both MCP tool hints and registered ability meta.
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@wpscholar wpscholar merged commit 2311a43 into main Jul 7, 2026
13 checks passed
@wpscholar wpscholar deleted the codex/task-tool-names branch July 7, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant