Skip to main content
Glama

Run a plugin ability

run_ability

Execute a registered WordPress ability to write plugin-owned data, ensuring validation, hooks, and cache invalidation run.

Instructions

Execute an ability registered through the WordPress Abilities API. This is the preferred way to write data a plugin owns — the plugin's own validation, hooks and cache invalidation all run, which raw SQL would bypass. Check get_ability_info for the input schema first. The Abilities API maps intent onto HTTP methods: read-only abilities use GET, ordinary ones POST, and destructive ones DELETE; this is chosen automatically unless you override it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFully qualified ability name from discover_abilities, in the form "namespace/ability".
inputNoArguments matching the ability's input_schema.
methodNoHTTP method. "auto" reads the ability's definition and picks GET for read-only, DELETE for destructive, POST otherwise.auto
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=false and destructiveHint=false, and the description adds useful context: it explains that the tool runs validation, hooks, and cache invalidation, and that the HTTP method is auto-selected based on the ability's definition (GET for read-only, DELETE for destructive). This goes beyond the annotations and helps the agent understand side effects and method behavior. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a few sentences that front-load the core purpose and usage, then detail the method mapping. It is reasonably concise and does not repeat schema information verbatim, though it could be tightened by removing the explicit method mapping details that are already in the parameter schema. Still, it's well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is no output schema, the description need not describe return values. It covers the required name, optional input, method selection, and site_id behavior, and points to get_ability_info for the input schema. It doesn't explicitly describe error behavior or what happens on invalid ability names, but for an execution tool this is acceptable. Overall, it provides enough context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters. The description adds some value for site_id by explaining the behavior with single vs. multiple sites and the default selection, and it instructs to check get_ability_info for input schema, which is helpful. However, these are moderate additions; the baseline of 3 is appropriate given the schema's completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Executes an ability registered through the WordPress Abilities API' with a specific verb and resource. It distinguishes itself from siblings like get_ability_info and discover_abilities by focusing on execution and by naming the sibling to check for schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear guidance on when to use this tool: 'This is the preferred way to write data a plugin owns', and contrasts it with raw SQL which bypasses validation. It also instructs the agent to check get_ability_info for the input schema first. However, it doesn't explicitly contrast with other write tools like update_content, but the plugin-owned scope is a clear differentiator.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server