Skip to main content
Glama

context7_docs

Fetch current library documentation from Context7 for any language. Get LLM-reranked snippets for a query to verify API usage before writing code.

Instructions

Fetch up-to-date library documentation from context7 for any language.

library_id is '/owner/repo' (e.g. '/numpy/numpy', '/golang/go', '/Z3Prover/z3'). Returns current, LLM-reranked doc snippets for query. Use before writing code that depends on library APIs you are unsure about.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fastNo
queryYes
library_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the disclosure burden. It states that the tool returns 'current, LLM-reranked doc snippets for query,' which reveals the output type and freshness. However, it does not explain the behavior of the `fast` parameter or mention potential network/error cases, leaving some behavioral aspects undisclosed.

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 three sentences, with the main purpose stated first, parameter details second, and usage guidance last. It includes code-formatted examples that are immediately useful and contains no fluff or redundancy.

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?

Given the presence of an output schema, the description doesn't need to detail return structure. It covers purpose, usage timing, critical parameter formats, and result character. The only noteworthy gap is the unexplained `fast` parameter, which is a minor omission for an optional boolean with a default.

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

Parameters4/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 explains `library_id` with the '/owner/repo' format and concrete examples like '/numpy/numpy'. It also clarifies that `query` is the search input. The `fast` boolean is left undocumented, but the other two parameters are well covered.

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 opens with a specific action and resource: 'Fetch up-to-date library documentation from context7 for any language.' This is a unique purpose among the sibling tools, which focus on calculations, code execution, and file/session operations, making it clearly distinguishable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use case: 'Use before writing code that depends on library APIs you are unsure about,' which tells the agent when to invoke it. It does not provide exclusions or alternatives, but none of the sibling tools serve a similar documentation-fetching role.

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/The-40-Thieves/codecalc'

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