Skip to main content

Overview

Delivers the most accurate and token-efficient context to coding agents from curated, up-to-date documentation and websites.
This tool provides the most powerful and token-efficient way to find specific information in package documentation by combining AI understanding with exact pattern matching.

Parameters

name
string
required
Name of the SDK/package to search documentation forUse minimal form without version numbers or ‘API’ suffix.Length: 1-200 charactersExamples: "next.js" (not “next.js 16”), "openai" (not “OpenAI API”), "react", "anthropic"
language
string
required
Programming language to filter resultsOptions: "python" | "javascript" | "typescript" | "go" | "rust"Examples: "python", "typescript"
query
string
required
Natural language query to search for in the documentationBe specific and clear about what you’re looking for.Length: 1-500 charactersExamples:
  • "How to implement authentication with middleware?"
  • "How to use async client for streaming responses?"
  • "How to handle errors in components?"

Returns

Returns a markdown-formatted string containing:
  • Matched documentation sections with titles and content
  • Semantic query matches
  • Pattern filter used
  • Relevance scores for each result
  • Summary if configured

Example Usage

search_documentation({
  name: "next.js",
  language: "typescript",
  query: "How to implement authentication with middleware?"
})

Best Practices

Begin with a single, specific query. This reduces cost and often provides better results.Good: "How to implement JWT authentication?"Avoid: "authentication stuff" or overly broad questions
Always include the programming language to get more accurate results for your use case.Example: language: "python" or language: "typescript"
Use minimal package names without version numbers or suffixes.Good: "next.js", "react", "fastapi"Avoid: "next.js 14", "React API"

Next Steps