Skip to main content
Glama

Call any REST endpoint

rest_api

Call any WordPress REST endpoint directly to access routes not covered by dedicated tools, including plugin-registered endpoints. Use discover_rest_routes first to find valid routes.

Instructions

Call any WordPress REST endpoint directly — the escape hatch for anything the dedicated tools do not cover, including routes registered by plugins such as WooCommerce, Yoast or ACF. Use discover_rest_routes first to find valid routes rather than guessing: an invented route returns rest_no_route and tells you nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoJSON request body for write methods.
queryNoQuery string parameters.
routeYesRoute including its namespace, e.g. "/wc/v3/orders" or "/wp/v2/posts/12".
methodNoHTTP method. Anything other than GET counts as a write and needs a writable site.GET
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.
max_charsNoTruncate the response at this many characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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 / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / max_chars / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_chars / minimum
      Added value: +100
    • addedInput schema / properties / query / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior3/5

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

The description adds one behavioral detail beyond the annotations: an invented route returns rest_no_route and gives no useful information. However, it does not disclose important side-effect or authorization behavior for write methods, even though the schema allows POST, PUT, PATCH, and DELETE. The annotations already supply some signal (readOnlyHint false, openWorldHint true), so the description provides modest additional context but does not fully carry the behavioral burden.

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

Conciseness5/5

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

The description is two sentences with no filler. The primary action is front-loaded, the plugin-route nuance follows naturally, and the discover_rest_routes warning is placed precisely where it matters. Every sentence earns its place.

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 that this is a deliberately open-ended generic REST tool, the description is as complete as practical: it covers scope, discovery guidance, and failure behavior. It could go further on side effects or authorization for non-GET methods, but the schema's method description and annotations already cover some of that. There is no obvious critical omission that would prevent an agent from calling it correctly.

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?

The schema already provides 100% parameter coverage, so the baseline is strong. The description adds meaningful route guidance: route values must be discovered rather than invented, and plugin-registered namespaces are valid targets. That is useful parameter-level insight beyond what the schema states for the required route field.

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 opens with a clear verb-resource statement: "Call any WordPress REST endpoint directly." It also distinguishes this tool from the many dedicated sibling tools by calling it the escape hatch for anything they do not cover, including plugin-registered routes from WooCommerce, Yoast, and ACF. The title and description are consistent and aligned.

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 when to use this tool: for scenarios where the dedicated tools do not cover the needed endpoint. It also gives an explicit before-step: 'Use discover_rest_routes first to find valid routes rather than guessing,' including a concrete failure signal (rest_no_route) and why guessing is useless.

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