Skip to main content
Glama

Search the FastAPI docs

search_docs
Read-onlyIdempotent

Finds relevant FastAPI documentation passages for a question or keywords and returns ranked results, helping users locate answers and supporting citations.

Instructions

Find the most relevant passages in the FastAPI documentation for a question.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoHow many passages to return
queryYesA question or keywords, e.g. 'how to upload files'

Output Schema

NameRequiredDescriptionDefault
hitsYes
queryYes
retrieverYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety and repeatability need no restatement. The description adds one useful detail beyond annotations: it returns ranked passages rather than whole pages. It says nothing about ranking basis, whether results can be empty, or how k interacts with ranking quality.

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 with no filler; the resource scope (FastAPI docs) and result type (relevant passages) land immediately. Nothing is repeated from the title or schema.

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-parameter read-only search tool with an output schema covering return values and full schema coverage on inputs, the description supplies what is needed to call it correctly. The only gap is routing guidance against get_page and list_pages, which is a minor omission at this complexity.

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%, including the k default of 5, its 1-10 bounds, and a query example, so the schema carries parameter meaning. The phrase "for a question" mildly reinforces that query accepts natural-language phrasing in addition to keywords, but adds no format or tuning guidance beyond what the schema already states.

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?

"Find the most relevant passages in the FastAPI documentation for a question" gives a specific verb (find), resource (documentation passages), and result quality (most relevant). It is distinguishable from get_page and list_pages by implication (ranked passage lookup vs. fetching/listing pages), but it never names or contrasts those siblings explicitly.

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?

Usage is implied by "for a question" and the docs-search framing, so an agent can infer this is the lookup tool when it doesn't know which page holds the answer. However, there is no explicit when-to-use statement, no mention of when to prefer get_page or list_pages, and no note about fallback behavior when nothing relevant is found.

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

Deploy Server

Other Tools