Skip to main content
Glama

scaffold_component

Generate ready-to-use WordPress component boilerplate for plugins, themes, blocks, and more, with built-in security patterns and i18n support.

Instructions

Generate boilerplate code for WordPress components. Types: plugin, theme, block, custom-post-type, taxonomy, rest-endpoint, widget, shortcode, elementor-widget, meta-box, settings-page, cron-job, ajax-handler. Returns ready-to-use code with proper WordPress patterns, security, and i18n.

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": {
      "type": "<type>",
      "name": "<name>",
      "conversationId": "<conversationId>"
    },
    "name": "scaffold_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName of the component (e.g., 'My Plugin', 'hero-section', 'book').
slugNoOptional slug override. If omitted, generated from name.
typeYesThe type of WordPress component to scaffold.
namespaceNoPHP namespace or prefix (e.g., 'MyPlugin', 'myplugin'). If omitted, generated from name.
descriptionNoDescription of the component.
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, the description carries the full behavioral burden. The phrase 'Returns ready-to-use code' is valuable because it signals the tool likely returns code rather than writing files to disk, and 'proper WordPress patterns, security, and i18n' hints at output characteristics. But it never resolves the key ambiguity of whether files are actually created, nor does it note any permissions, side effects, or limits.

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?

The definition is front-loaded with the core action, followed by the type list and output characteristics. The type enumeration is long but functional and matches the schema enum; otherwise there is no filler.

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 is the only place to learn what comes back; it says 'ready-to-use code' but not whether that is files, a code block, or a multi-file bundle. For a six-parameter generation tool it covers the essentials but leaves the return shape and side effects underspecified.

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 every parameter including the type enum and the conversationId's origin from learn_wordpress_api. The description's type list duplicates the enum rather than adding new meaning, so 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 description opens with a specific verb and resource ('Generate boilerplate code for WordPress components') and enumerates all thirteen supported component types, so an agent knows exactly what it produces. It does not distinguish itself from any sibling tool, which keeps it below 5.

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 enumeration of component types — an agent can infer this is the tool for creating new WordPress component scaffolding. However, there is no explicit when-to-use vs. when-not guidance and no reference to related siblings such as validate_php or analyze_plugin that would consume or check the output.

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