Skip to main content
Glama

Get Library Docs

get-library-docs

Fetch current documentation for libraries and frameworks to ensure accurate code generation and prevent outdated API references.

Instructions

Fetches up-to-date documentation for a library. You must call 'resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context7CompatibleLibraryIDYesExact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'.
topicNoTopic to focus documentation on (e.g., 'hooks', 'routing').
tokensNoMaximum number of tokens of documentation to retrieve (default: 5000). Higher values provide more context but consume more tokens.
Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool 'fetches up-to-date documentation' which implies read-only behavior, but doesn't explicitly state whether this requires authentication, has rate limits, or what format the documentation returns. It adds some context about the ID requirement but lacks comprehensive behavioral details.

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 efficiently structured in two sentences that each serve distinct purposes: the first states the core function, the second provides critical usage guidance. There's no wasted language, and the most important information (the prerequisite requirement) is appropriately front-loaded in the second sentence.

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 tool with 3 parameters, 100% schema coverage, and no output schema, the description provides adequate but not comprehensive context. It explains the prerequisite relationship with the sibling tool well, but doesn't address what the documentation output looks like or any behavioral constraints beyond the ID requirement. The absence of annotations means more behavioral context would be helpful.

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%, so the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema - it mentions the library ID requirement and format but doesn't provide additional semantic context about the parameters beyond what's already in the schema descriptions.

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 clearly states the action ('fetches up-to-date documentation') and resource ('for a library'), making the purpose specific and unambiguous. It distinguishes from the sibling 'resolve-library-id' by explaining this tool retrieves documentation while the sibling resolves IDs, establishing clear functional separation.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: it instructs to call 'resolve-library-id' first unless the user provides a library ID in specific formats. This creates clear prerequisites and decision rules for the agent, directly addressing the sibling relationship.

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/renCosta2025/context7fork'

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