Skip to main content
Glama

validate_block_json

Validate block.json or theme.json files against WordPress schemas to catch missing fields, invalid values, attribute/supports issues, and common mistakes before deployment.

Instructions

Validate block.json or theme.json files against WordPress schemas. Checks required fields, valid values, attribute definitions, supports features, and common mistakes. Type: 'block' for block.json, 'theme' for theme.json.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "json": "<json>",
      "conversationId": "<conversationId>"
    },
    "name": "validate_block_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesThe JSON content of block.json or theme.json to validate.
typeNoType of JSON file: 'block' for block.json, 'theme' for theme.json.block
revisionNoRevision number.
artifactIdNoArtifact ID for tracking revisions.
conversationIdYesThe conversation ID obtained from learn_wordpress_api.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It lists the validation categories checked, but says nothing about whether the tool is read-only, what the response looks like (errors vs. warnings, pass/fail), or what the revision/artifactId parameters imply about persisted state — a notable omission for a validator that appears to track revisions.

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?

Three short lines, front-loaded with the core action and then the checking scope, with no filler. The final line largely duplicates the schema's enum description, which is the only wasted sentence.

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?

For a five-parameter tool with no output schema and no annotations, the description should say what a validation result looks like so the agent knows how to interpret the call. It also leaves the revision/artifactId tracking mechanism unexplained, so an agent cannot confidently use those optional parameters.

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%, so the schema already documents all five parameters, and the description adds only a restatement of the type enum already present in the schema. It offers no extra meaning for revision, artifactId, or conversationId, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ("Validate") and a precise resource scope ("block.json or theme.json files against WordPress schemas"), and enumerates what is checked. That scope implicitly separates it from validate_php, though it never explicitly contrasts with validate_theme_template, which an agent could reasonably confuse with theme.json validation.

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 'type' guidance ("'block' for block.json, 'theme' for theme.json") tells the agent how to pick the mode, which is genuinely useful. However, there is no guidance on when this tool is the right choice versus validate_theme_template or validate_php, nor any stated prerequisites such as needing a conversationId before calling.

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