Skip to main content
Glama

Run a plugin ability

run_ability

Execute registered WordPress abilities to safely write plugin-owned data, triggering validation, hooks, and cache invalidation while automatically choosing the correct HTTP method.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / name / pattern
      Added value: +"^\\s*[a-zA-Z0-9-]+(?:\\/[a-zA-Z0-9-]+)+\\s*$"
  2. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only mark readOnlyHint=false and destructiveHint=false, which is ambiguous. The description goes beyond by explaining the automatic HTTP method mapping (GET for read-only, DELETE for destructive) and that plugin hooks and cache invalidation run. This is valuable behavioral context not in 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 informative but a bit long; however, every sentence adds value—usage context, method mapping, and site_id default. It is front-loaded with the main purpose and then adds necessary nuance. Could be slightly tightened, but no fluff.

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 the absence of output schema and nested input object, the description covers the key aspects: usage, method selection, and site selection. It omits error handling or return value details, but for a tool with openWorldHint=true and no output schema, this is adequate.

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

Parameters4/5

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

Schema description coverage is 100%, so parameters are well documented in the schema itself (name, input, method, site_id). The description adds context by explaining the 'auto' method and the site_id default behavior, which enhances understanding beyond the bare schema.

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 'Execute an ability registered through the WordPress Abilities API' — specific verb and resource. It distinguishes itself from raw SQL and mentions get_ability_info as a companion, enough to differentiate from siblings like discover_abilities or get_ability_info.

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

Usage Guidelines5/5

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

The description explicitly says it is the 'preferred way to write data a plugin owns' and contrasts with raw SQL. It advises checking get_ability_info first for the input schema, which is direct when-to-use guidance. It does not list alternatives by name, but the context is sufficient.

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

Deploy Server

Other Tools