Skip to main content
Glama
mcp-server-nuxt

mcp-server-nuxt

by rynx-cc

scaffold_nitro_api

Generate a Nitro API handler under server/api/ with H3 defineEventHandler and optional Zod body validation, supporting HTTP method selection and dry-run preview.

Instructions

Generate a new Nitro server API handler under server/api/ with H3 defineEventHandler and optional Zod body validation.

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": {
      "path": "<path>"
    },
    "name": "scaffold_nitro_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
zodNoInclude readValidatedBody with a Zod schema (default false)
pathYesAPI path, e.g. /api/hello or /api/users/:id
dryRunNoWhen true (default), return the planned file without writing
methodNoHTTP method (default: handle all methods)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.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 behavioral burden, and it omits the things that matter most for a file-writing tool: whether it overwrites an existing file, what it returns, and that dry-run behavior exists at all (only the schema reveals the default is non-writing). It does at least disclose the output location and the H3 handler shape, which is genuine context beyond structured fields.

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?

A single front-loaded sentence with no filler; the action, target directory, and generated code style all appear immediately. Nothing here would be trimmed without losing signal.

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

Completeness2/5

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

For a scaffolding tool that writes files with no annotations and no output schema, the description should cover overwrite behavior, what the return value looks like in dry-run vs. write mode, and post-generation steps. None of that is present, leaving an agent to infer safety and result shape.

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 every parameter is already documented in the schema, including the zod flag, method enum, and dryRun default. The description only echoes the zod validation aspect and adds no new meaning about path format, method defaults, or dry-run semantics.

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 names a specific verb and resource ('Generate a new Nitro server API handler') and pins down the target location ('under server/api/') plus the implementation pattern ('H3 defineEventHandler'). It is clearly distinct from read-only siblings like list_server_routes or get_route, though it does not explicitly contrast itself with add_route or generate_component.

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 only implied: the word 'Generate' signals a scaffolding action for a new handler, and the sibling list makes the read vs. create distinction inferable. There is no explicit statement of when to use this over add_route/generate_component, no prerequisite conditions, and no mention of what happens if the path already exists.

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