Skip to main content
Glama

get_routes

Read-onlyIdempotent

Detect API routes and pages in a Next.js App Router project to map their paths, files, HTTP methods, and types.

Instructions

Detect API routes and pages in a Next.js App Router project: path, file, HTTP methods, type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoProject name/path (default: active).
max_resultsNoMax routes to return (0 = all, default 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds the output fields, but says nothing about scanning behavior, recursion scope, or pagination that would enrich the agent's expectations.

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 that names the verb, the project type, and the returned fields with zero filler.

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 two-optional-parameter read tool with full annotation coverage and no output schema, the description adequately covers purpose and return fields. Minor gaps remain around what 'type' and the routes-vs-pages distinction mean, but nothing blocks correct invocation.

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 both parameters ('project' with default active, 'max_results' with 0=all) are already documented in the schema. The description adds no parameter meaning beyond that, so the 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?

States a specific verb ('Detect') and resource ('API routes and pages in a Next.js App Router project') and even lists the returned fields (path, file, HTTP methods, type). Clear enough to distinguish, though no sibling overlaps this domain so explicit differentiation isn't demonstrated.

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 implies usage ('in a Next.js App Router project') but gives no when-to-use guidance, no prerequisites, and names no alternatives such as get_entry_points or list_files. An agent gets no routing signal about when this is the right tool.

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