Skip to main content
Glama
mantle-bearer

fastapi-mcp-server

list_registered_routes

Discover all registered HTTP routes in a FastAPI app, router, or live URL, including methods, operation IDs, summaries, and tags.

Instructions

List all registered HTTP routes, methods, operation IDs, summaries, and tags from a FastAPI app, APIRouter, or live URL.

Args: app_path: Import string pointing to the target (e.g. 'main:app', 'routers.items:router', 'http://localhost:8000/docs'). project_dir: Optional path to the project root directory. Defaults to current working directory.

Returns: A list of registered routes or an error dictionary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_pathYes
project_dirNo
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It does mention accepting import strings or live URLs and returning an error dictionary on failure, which is useful. However, it does not disclose that importing an app or fetching a URL may execute code or make network requests, nor what failure cases produce the error dictionary.

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 concise and well structured: a one-sentence purpose, then brief Args and Returns sections. Every sentence adds useful information and the main capability is front-loaded.

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?

Although there is no output schema and no annotations, the description covers purpose, both parameters, accepted app_path forms, defaults, and the general return type. The first sentence also implies the output shape by listing route fields. A concrete example entry or explicit mention of import/URL side effects would make it fully complete, but for a two-parameter read-only enumeration tool this is strong.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must do the work for both parameters. It explains app_path as an import string with concrete examples and project_dir as an optional project-root path defaulting to the current working directory. This fully compensates for the empty schema descriptions.

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 uses a specific verb ('List') and names the resource ('registered HTTP routes') plus the exact attributes returned (methods, operation IDs, summaries, tags), and lists the possible sources (FastAPI app, APIRouter, live URL). It is clear, but it does not explicitly differentiate itself from sibling get_openapi_schema, which could also expose route/method information.

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 expected use case is implied: an agent should call this when it needs an inventory of routes from a FastAPI app, router, or URL. However, the description does not state when not to use it or contrast it with alternatives such as get_openapi_schema or discover_fastapi_project.

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/mantle-bearer/fastapi-mcp-server'

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