search_claude_code_docs
Find Claude Code documentation sections for CLI, hooks, settings, and usage; get a short answer and a Markdown report with full section text for deeper reading.
Instructions
Search the live Claude Code documentation (https://code.claude.com/docs/llms.txt and llms-full.txt) for SECTIONS of Claude Code docs pages. Best for finding Claude Code CLI, hooks, settings, and usage documentation. Returns a SHORT answer and writes the full text to a Markdown report file. The answer has the query, a "Best match: strong | weak | none (best score ...)" line (a score band, not a claim that the docs answer the query: strong is a best-section score of at least 0.5, weak at least 0.3, otherwise none), "Report: ", one line per listed section (page > heading path | sectionId | score | the line range of the section in the report and of its best-scoring window), the changelog pointer line when the changelog page matches, and the verbatim best-scoring window of the #1 section only (labelled; the answer may be elsewhere in that section, so read the listed report lines). Read or grep the report file for the full section text (code blocks intact, never truncated); the sectionIds can be used as-is with get_claude_code_doc_content. Report location: APPLE_DOCS_MCP_REPORTS_DIR if set, else $CLAUDE_PROJECT_DIR/reports_dev/cc-docs-search/, else a folder under the system temporary directory; the server never deletes reports, and a failed write fails the search. The report holds every section scoring at least 0.3 (at least the best one, at most 4 times maxResults). The changelog is never searched by section; when it matches, the answer carries a pointer line naming search_claude_code_changelog and get_claude_code_changelog. Latency: one live index fetch, one revalidation of llms-full.txt (about 11 MB, cached on disk and revalidated with If-Modified-Since on every call; a cold start downloads it), then two Jev passes (pages by their headings, then the windows of the sections); the whole call has a 120 s deadline and fails as a whole with TIMEOUT, never partially. Failure: any fetch failure (no stale cache is served), any Jev failure, a report write failure or the deadline fails the whole search; there is no unranked fallback. Requires Jev, which is on by default when OPENROUTER_API_KEY or TYPESAFE_API_KEY (or APPLE_DOCS_MCP_JEV_PROVIDER and its key) is set; APPLE_DOCS_MCP_JEV_RERANK=0 turns it off, and then this search fails before any request. Cost: the Jev usage of each call is the last line of the answer; measured on 2026-11-29 with 4 live queries (Jev-reported), a search cost 0.84 to 1.34 cents and took 4.3 to 6.6 s, and two early runs took 22 s (their cause was not measured).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_claude_code_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for the Claude Code documentation. Examples: "hooks", "subagents", "settings", "MCP configuration". The query must contain non-whitespace text; a blank query is rejected with an error. Limit: 2,000 characters of JSON-encoded length: escaped characters (quotes, backslashes, newlines, tabs) count twice, other control characters six times. A longer query is rejected with an error before any request is made. | |
| maxPages | No | Number of documentation PAGES the Jev page pass keeps for the section search (1 to 10, default 3); a larger value is rejected with an error. Counts pages, not sections. The changelog is scored by the page pass but never searched by section and never takes one of these slots. A higher value reads more pages' sections (more Jev section windows, a longer search); the best sections of the whole docs by BM25 are added regardless. | |
| maxResults | No | Maximum number of SECTIONS listed in the answer (1 to 20, default 5); a larger value is rejected with an error. Counts sections, not pages; only sections scoring at least 0.3 are listed (the best one always is). The report file holds up to 4 times as many sections as are listed. |