Skip to main content
Glama

Discover REST routes

discover_rest_routes
Read-only

List REST namespaces and routes registered by your WordPress site, including plugin-added ones, to verify available endpoints before making API calls.

Instructions

List the REST namespaces and routes the site actually registers, including those added by plugins. Use this before rest_api so you call routes that exist — WordPress route shapes vary between plugin versions and guessing wastes calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoFilter routes by substring.
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.
namespaceNoShow routes under one namespace only, e.g. "wc/v3".
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds behavioral context beyond annotations: it includes plugin-added routes and notes that route shapes vary across plugin versions — information not present in the schema or annotations. However, it doesn't describe return format or pagination, which are minor for a discovery tool.

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 zero redundancy. The core purpose is stated first, followed by actionable usage guidance with rationale. Every word earns its place; no filler or repetition of schema information.

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?

The description is sufficient for a read-only discovery tool with no output schema. It covers what the tool does, when to use it, and important caveats about plugin versions. Minor gap: return format is not mentioned, but for a list tool with no specific output schema, this is acceptable. It leverages annotations for safety context.

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%, with clear descriptions for search, site_id, and namespace parameters, including default-site behavior. The tool description adds no extra parameter semantics, but since the schema fully documents them, the baseline of 3 is appropriate.

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 action ('List the REST namespaces and routes') and a specific resource (site-registered routes, including plugin-added ones). It clearly differentiates itself from the sibling rest_api by noting it lists actually registered routes, which prevents guessing. This is a precise, non-tautological purpose.

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 instructs to use this tool before rest_api to ensure called routes exist, and gives rationale ('route shapes vary between plugin versions and guessing wastes calls'). This provides clear when-to-use guidance and implicitly warns against guessing, making it easy for an agent to decide when to invoke it.

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