Skip to main content
Glama

generate_fastapi_router

Create a FastAPI router with ready-to-use CRUD endpoints and dependency injection. Define a resource name and optional fields to generate a functional API router.

Instructions

Generate a FastAPI router with CRUD endpoints and dependency injection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoResource fields as name:type pairs
api_keyNoAPI key for authentication
resource_nameYesResource name (e.g. users, products)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Generate' implies code creation, but the description does not state whether it writes files, returns code, has side effects, or requires an existing project. This is a significant gap for a code-generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single compact sentence with no filler; the core deliverable and its main features are front-loaded. It is appropriately terse, though the brevity comes at the cost of omitting useful behavioral context.

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

Completeness2/5

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

With no annotations and no output schema, the description must provide operational context, but it does not. It omits whether code is written to disk or returned, how api_key is used, and any relationship to sibling generation tools. An agent cannot fully understand the invocation side effects or integration points.

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 description coverage is 100%, so all parameters already have meaningful descriptions: fields as 'name:type pairs', api_key as 'API key for authentication', and resource_name with an example. The description adds no additional parameter-level context, and the schema adequately documents them.

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 states a specific deliverable ('FastAPI router') and a clear scope ('CRUD endpoints and dependency injection'), using a concrete verb 'Generate'. It is clear what the tool produces, though it does not explicitly differentiate from siblings like scaffold_fastapi_project or generate_fastapi_models.

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?

No guidance is given on when to use this tool versus alternatives. There is no mention of prerequisites, whether it should follow a project scaffold, or when sibling tools such as generate_fastapi_models would be more appropriate. The agent is left to infer the usage context.

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/barnburner121/claude-plugin-marketplace'

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