Context7 Platform -- Up-to-date docs for AI agents
Update tool descriptions in index.ts for clarity on library ID resolution process (#1890)
Enes Gules1a52cb918ea8
diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.tsindex 95f52d49..8224fb7b 100644--- a/packages/mcp/src/index.ts+++ b/packages/mcp/src/index.ts@@ -147,7 +147,7 @@ server.registerTool(title: "Resolve Context7 Library ID",description: `Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.-You MUST call this function before 'query-docs' to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.+You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.Selection Process:1. Analyze the query to understand what library/package the user is looking for@@ -233,7 +233,7 @@ server.registerTool(title: "Query Documentation",description: `Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.-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.+You must call 'Resolve Context7 Library ID' tool 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.IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best information you have.`,inputSchema: {