Skip to main content
Glama

Context7 MCP

by decvb

get-library-docs

Fetch precise, version-specific library documentation and code examples using a verified Context7-compatible library ID. Enhance LLM prompts by focusing on specific topics and controlling token limits for optimal context.

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.

Input Schema

NameRequiredDescriptionDefault
context7CompatibleLibraryIDYesExact Context7-compatible library ID (e.g., 'mongodb/docs', 'vercel/nextjs') retrieved from 'resolve-library-id'.
tokensNoMaximum number of tokens of documentation to retrieve (default: 5000). Higher values provide more context but consume more tokens.
topicNoTopic to focus documentation on (e.g., 'hooks', 'routing').

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "context7CompatibleLibraryID": { "description": "Exact Context7-compatible library ID (e.g., 'mongodb/docs', 'vercel/nextjs') retrieved from 'resolve-library-id'.", "type": "string" }, "tokens": { "description": "Maximum number of tokens of documentation to retrieve (default: 5000). Higher values provide more context but consume more tokens.", "type": "number" }, "topic": { "description": "Topic to focus documentation on (e.g., 'hooks', 'routing').", "type": "string" } }, "required": [ "context7CompatibleLibraryID" ], "type": "object" }
Install Server

Other Tools from Context7 MCP

Related Tools

    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/decvb/context7'

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