Skip to main content
Glama
aferreiraguido

javascript-mcp-server

list_next_api_routes

Lists Next.js API routes from the app router, showing HTTP methods, dynamic parameters, and middleware matchers.

Instructions

API routes of the Next app router: route.ts with HTTP methods (GET/POST/...) and dynamic params, plus middleware.ts with its matcher.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the returned content: route.ts files with HTTP methods and dynamic params, plus middleware.ts with its matcher. This is useful behavioral detail, though it does not explicitly describe the return format or state limitations beyond the implicit 'Next app router' scope.

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?

The description is a concise single sentence that front-loads the core purpose ('API routes of the Next app router') followed by specific details. It contains no waste or redundancy.

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

Completeness4/5

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

For a simple listing tool with one parameter and no output schema, the description adequately explains what is included. It could mention the loaded project requirement more explicitly, but the schema covers the parameter. Overall, it is sufficient for an agent to invoke correctly.

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?

The input schema fully describes the single parameter 'name' (Name or path of the loaded project) with 100% coverage. The description adds no parameter-specific information, 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?

The description specifies exactly what the tool lists: Next.js App Router API routes (route.ts), including HTTP methods, dynamic params, and middleware.ts matcher. This distinguishes it from sibling list_next_routes by restricting to API routes in the App Router, and the verb 'list' is present in the tool name.

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 description implies usage for Next.js App Router projects but does not provide explicit when-to-use guidance or alternatives. It does not mention that list_next_routes might be used for other route types, nor does it state exclusions. The scope is clear from 'Next app router,' but no comparative direction is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aferreiraguido/javascript-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server