Skip to main content
Glama
AbdessamadTzn

FastAPI Architect MCP

get_dependencies

Retrieve the complete dependency injection tree for any FastAPI handler, including router, decorator, and signature dependencies, to understand and debug handler dependencies across the entire project.

Instructions

Get the full Depends() injection tree for a FastAPI handler across the entire project.

Includes router-level, include_router, decorator-level and signature dependencies. handler may be a function name, a "Class.method" qualname, or a graph id ("app.routes.users:list_users").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handlerYes
project_rootYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • removedInput schema / properties / file
      Removed value: -{
      -  "title": "File",
      -  "type": "string"
      -}
    • addedInput schema / properties / project_root
      Added value: +{
      +  "title": "Project Root",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file",
      -  "handler"
      -]New value: +[
      +  "project_root",
      +  "handler"
      +]
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it scans the whole project, aggregates multiple dependency sources, and accepts three handler identifier forms. It does not describe the return shape or error behavior, but it gives more behavioral context than most descriptions of this type.

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 compact and front-loaded: the action is stated in the first sentence, followed by the key inclusion detail and a concrete parameter note. Every sentence earns its place, with no filler or repetition.

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 two-parameter query tool, the description is mostly sufficient to attempt a call, but there is no output schema and no description of the returned structure, empty results, or failure modes. The lack of usage-routing guidance also leaves some contextual gaps despite the strong core definition.

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 coverage is 0%, so the description must compensate. It thoroughly documents `handler` by listing function names, qualified 'Class.method' names, and graph ids with an example. However, `project_root` gets no explanatory treatment beyond its parametric name, leaving its expected format or path semantics implicit.

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 uses a specific verb and resource: it fetches the full Depends() injection tree for a FastAPI handler across the project. It also enumerates the included dependency levels (router-level, include_router, decorator-level, signature), which clearly differentiates it from graph-oriented siblings like build_dependency_graph.

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 does not state when to use this tool versus the many sibling tools, nor does it name alternatives or exclusions. The 'across the entire project' and 'full' phrasing imply comprehensive scope, but the agent is left to infer when to choose this instead of build_dependency_graph or find_references.

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