agents/ability-call should only dispatch abilities that opt into an external surface
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start by locating the agents/ability-call and agents/ability-search implementations and the agents_ability_call_permission filter. Trace how registered ability metadata is read and how dispatchability is decided, then check the related tests. Done means calls and search results follow the external-surface rule by default, hosts can override it with a filter, and the permission callback receives the target name and metadata.
Written by the indexing model from the issue text.
Description
Summary
agents/ability-call executes any registered ability by name and checks only the target ability's permission_callback. It ignores the target's exposure metadata (show_in_rest, mcp.public).
Many plugins register in-process primitives with show_in_rest: false and a permissive permission callback. They expect only trusted server-side PHP to call them, and in the ecosystem "not REST-exposed" is commonly treated as "internal". When a host widens agents_ability_call_permission for non-administrators, which is the documented extension point, every such primitive becomes callable by those users. agents/ability-call is itself show_in_rest: true, so that includes calls through core /wp-abilities/v1.
Proposal
- By default,
agents/ability-call(andagents/ability-searchresults) only dispatch abilities that opt into an external surface:meta.show_in_rest === trueormeta.mcp.public === true. This matches the WordPress MCP adapter convention. - Add a filter, e.g.
agents_ability_call_dispatchable, for hosts that need a different rule. - Pass the target ability name and meta into
agents_ability_call_permission, so hosts can make per-target decisions without re-reading the registry.
Context
The Extra Chill MCP worked around this at the host layer (Extra-Chill/extrachill-mcp#24). The fix belongs in the substrate so every host gets a safe default.
🤖 AI-generated (Extra Chill Bot / Pi).
- Dominant language
- PHP
- Stars
- 36
- Forks
- 10
- Avg merge
- 14m
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/agents-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/agents-api#564 ·
-
ability-search: expose full input schemas (optional fields) for selected abilitiesPossibly taken @chubes4 claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Automattic/agents-api#592 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 6/100
Automattic/agents-api#590 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Automattic/agents-api#584 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Automattic/agents-api#552 ·
All issues in Automattic/agents-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Codeinwp/optimole-wp#1259 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Sylius/SyliusResourceBundle#1179 ·
-
repo:ckeditor
Difficulty 1/5 Under an hour Newbie friendliness 78/100
craftcms/ckeditor#682 · 1 comment ·
Maintainers usually reply within 1 day