Skip to main content
Glama

validate_rest_schema

Validate WordPress REST API endpoint registration, permission callbacks, sanitization, response schema, and namespace consistency in your plugin.

Instructions

Validate WordPress REST API endpoints in a plugin: check route registration, permission callbacks, sanitize/validate callbacks, response schema, and namespace consistency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the plugin root
namespaceNoExpected REST namespace (e.g., "myplugin/v1")
Behavior3/5

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

With no annotations, the description carries the full burden. It reveals the tool performs checks (route registration, callbacks, schema), but does not disclose if it modifies anything, requires network access, or returns status messages. The read-only nature is implied but not explicit.

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 a single, well-structured sentence that lists the key validation aspects. It is concise without unnecessary words, making it easy to parse. Every part contributes to understanding the tool's purpose.

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

Completeness3/5

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

Given the tool lacks an output schema, the description should explain the return value or result format. It does not. The tool is simple with two parameters, but the description is adequate for basic understanding. Missing details on success/failure indicators or error handling reduce completeness.

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 coverage is 100% with descriptions for both parameters. The description adds context: 'namespace' is clarified as 'expected REST namespace (e.g., myplugin/v1)', which aids understanding beyond the schema. The path parameter is straightforward, but the description ties namespace to a specific use.

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 explicitly states the tool's purpose: validating WordPress REST API endpoints in a plugin. It lists specific checks (route registration, permission callbacks, etc.), making the function clear. It distinguishes from sibling validation tools (e.g., validate_hook_usage) by targeting REST API schema.

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

Usage Guidelines3/5

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

The description implies usage when validating a plugin's REST API, but it lacks explicit guidance on when to use this tool versus alternatives (e.g., validate_security_compliance). No when-to-use or when-not-to-use conditions are given, leaving the agent to infer context.

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/WPDiggerStudio/wpzylos-mcp'

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