Skip to main content
Glama
mcp-server-nuxt

mcp-server-nuxt

by rynx-cc

explain_middleware

Explains Nuxt middleware type, global run order, applied routes, and navigateTo/abortNavigation calls via static analysis; omit the name to list all middleware and flag missing references.

Instructions

Explain a Nuxt middleware (global / named / inline): its type, global run order, the routes it applies to, and whether it calls navigateTo or abortNavigation. Omit name to list all middleware and flag pages referencing missing middleware. Static analysis only — no DevServer or nuxi prepare.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "explain_middleware"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoMiddleware name or a file under middleware/, e.g. auth or middleware/auth.ts. Omit to list all middleware.
rootNoOptional project root override (defaults to the server project path)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose a meaningful constraint: static analysis only, with no DevServer or nuxi prepare, which tells the agent results may not reflect runtime-resolved behavior. It also discloses the bonus behavior of flagging pages that reference missing middleware. It never explicitly states read-only/no side effects, but 'Explain' plus 'static analysis' strongly implies it.

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?

Three dense sentences, front-loaded with what is reported, then the no-argument mode, then the static-analysis caveat. No filler and no restatement of the tool name.

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

Completeness5/5

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

For a 2-parameter, zero-required analysis tool with no output schema and no annotations, the description fully specifies the return content (type, order, routes, navigation calls) and the fallback listing behavior, plus a limitation that affects trust in the answer.

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 coverage is 100%, so 'name accepts a middleware name or a file under middleware/' is already documented in the schema, and root is fully described there. The description only adds the list-mode consequence of omitting name, so the baseline of 3 applies.

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?

States a specific verb (Explain) and resource (Nuxt middleware) and enumerates exactly what is reported: middleware type (global/named/inline), global run order, applied routes, and whether it calls navigateTo or abortNavigation. That enumeration distinguishes it from neighboring explain_* tools such as explain_route or explain_data_fetching without opening any schema.

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

Usage Guidelines4/5

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

Gives a clear conditional for the two modes: supply a name for one middleware, or omit name to list all middleware and flag dangling page references. No explicit 'do not use this when…' or named alternative is given, so it stops short of full routing guidance.

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