Skip to main content
Glama

Call any REST endpoint

rest_api

Call any WordPress REST endpoint directly, including plugin routes like WooCommerce, to access functionality beyond dedicated tools. Use discover_rest_routes first to validate routes and avoid rest_no_route errors.

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.
Behavior4/5

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

Annotations (readOnlyHint:false, openWorldHint:true, destructiveHint:false) already signal that this is a non-read-only, open-world tool. The description adds value by naming plugin routes and warning about rest_no_route errors, but it does not explicitly state that write methods require a writable site (though this is covered in the schema's method parameter). Not contradicting annotations; adds useful context.

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?

Two sentences with no filler. The purpose is front-loaded, then usage guidance follows. Every word earns its place; the hint to use discover_rest_routes is both concise and actionable.

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

Completeness5/5

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

For an open-world catch-all tool, this description is highly complete: it describes scope (any endpoint, including plugin routes), gives a discovery workflow, explains the failure mode, and implicitly signals write capability via method hints (though that's in schema). It covers everything an agent needs to decide when and how to call it, given the rich schema.

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% and the schema already documents all six parameters. The description adds some semantic context for the route parameter (validity, discover_rest_routes), but does not elaborate on body/query/site_id beyond what the schema states. Baseline of 3 is appropriate since the description does not need to repeat schema details.

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 states a specific verb ('Call') and resource ('any WordPress REST endpoint'), and explicitly frames it as the 'escape hatch' for what dedicated tools do not cover, naming plugin examples (WooCommerce, Yoast, ACF). This clearly distinguishes it from the many sibling tools that target specific resources.

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?

It provides explicit when-to-use guidance: use this for anything the dedicated tools do not cover, and specifically instructs to 'Use discover_rest_routes first to find valid routes rather than guessing.' It also warns against inventing routes and explains the error behavior (rest_no_route), which sets the right expectations.

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