Skip to main content
Glama

analyze_theme

Analyze a WordPress theme directory to find missing files, header and template hierarchy issues, escaping gaps, and translation-readiness problems in block or classic themes.

Instructions

Analyze a WordPress theme directory for best practices and issues. Checks: required files, style.css headers, template hierarchy, theme.json, functions.php patterns, escaping, translation-readiness, screenshot. Works with both block (FSE) and classic themes.

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": {
      "themePath": "<themePath>",
      "conversationId": "<conversationId>"
    },
    "name": "analyze_theme"
  }
}

Input Schema

NameRequiredDescriptionDefault
themePathYesAbsolute path to the WordPress theme directory.
conversationIdYesThe conversation ID obtained from learn_wordpress_api.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose a substantial amount of scope: the specific checks performed (required files, style.css headers, template hierarchy, theme.json, functions.php patterns, escaping, i18n readiness, screenshot). It does not state whether the operation is strictly read-only or that it touches the filesystem, nor does it describe the shape of the findings returned.

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?

Front-loaded with the purpose, then a compact list of checks, then a compatibility note. Each element carries information the agent could not get from the schema; only the trailing FSE/classic note borders on redundant detail.

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?

There is no output schema and no annotations, so the description should ideally say what the analysis returns (severity levels, per-file findings, pass/fail) and whether the theme is modified. It covers input scope and check coverage well but leaves the result contract and side-effect profile unaddressed.

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 both parameters are documented there, including where conversationId comes from. The description adds no path format constraints or hints about conversationId, so the schema does all the work and the baseline 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?

The first sentence gives a specific verb and resource ("Analyze a WordPress theme directory") plus the goal ("best practices and issues"), and the enumerated checks make the scope concrete. It is clearly a theme-directory auditor rather than a plugin, template or content tool, though it never explicitly distinguishes itself from the sibling validate_theme_template.

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?

Usage is implied by the subject matter: point it at a theme directory to get a best-practices audit. The note that it "Works with both block (FSE) and classic themes" usefully widens the applicability, but there is no when-not-to-use guidance and no mention of when to prefer validate_theme_template or validate_php instead.

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