Skip to main content
Glama
aferreiraguido

javascript-mcp-server

list_next_routes

Identify and list all Next.js routes, including app router pages and pages router files, to map the project's routing structure.

Instructions

Next.js routes: app router (app/**/page.tsx) and pages router (pages/*.tsx).

Input Schema

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

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

There are no annotations, so the description must fully disclose behavior. It does specify exactly which file patterns are considered routes, which is a useful constraint. However, it doesn't state what the tool returns (e.g., a list of file paths), whether it requires a previously loaded project, or any side effects. This minimal disclosure is insufficient for a tool with no annotations.

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 single, compact sentence that immediately states the scope ('Next.js routes') and provides the specific glob patterns. There is no wasted verbiage, and the structure is easy to parse.

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?

For a simple listing tool with one parameter and no output schema, the description covers the core content (route patterns) but omits behavioral details like return format and prerequisites. It's adequate for basic understanding but leaves some gaps, so it's not fully complete.

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 schema already describes the 'name' parameter as 'Name or path of the loaded project' with 100% coverage, so the description doesn't need to add parameter details. The description doesn't mention the parameter at all, but the schema handles it, so the baseline of 3 is appropriate.

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 clearly identifies the resource (Next.js routes) and precisely defines the two router patterns (app/**/page.tsx and pages/*.tsx), which differentiates it from sibling tools like list_next_api_routes. However, the action verb 'list' appears only in the tool name, not in the description itself, so it's clear but not as explicit as it could be.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that this is for page routes specifically, while list_next_api_routes is for API routes, nor does it indicate any prerequisites such as the project being loaded. The usage context must be inferred entirely from the description and tool name.

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