search when your agent knows the topic and needs the relevant docs page. Use docs_list when it needs to browse the available documentation set first. Use docs_read to read the exact page or line range.
Use these tools when docs explain the public API better than source code, or when your agent needs to compare documented behavior against implementation behavior.
search — find documentation by topic
search — find documentation by topic
search is the primary discovery tool for documentation questions. It can search indexed package docs alongside code and symbols, then return documentation hits that chain into docs_read.Use it when your agent knows the package and topic, such as an option name, guide title, error message, migration note, or API behavior.CLI usageDiscovery query string. Describe the documentation topic, API, option, behavior, or error message you need.
Single search target. Package format:
npm:react@18.2.0 or npm:react for latest. Repository format: https://github.com/facebook/react.Set to
docs when you only want documentation results. Omit it when documentation can be mixed with code and symbol results.Maximum results to return.
pageId to docs_read to read the page or a focused line range.docs_list — browse documentation pages
docs_list — browse documentation pages
docs_list lists available documentation pages for a package. It covers hosted/crawled docs and repository-backed documentation files.Every entry includes a stable pageId, a sourceKind (crawled or repo), and a source URL. Repository-backed entries also expose repoUrl, gitRef, and filePath for source follow-ups.CLI usagePackage registry.
Package name. Scoped names are supported.
Optional package version.
Maximum pages to return (1-500, default 100).
Pagination cursor from a previous
docs_list response.docs_read — read a documentation page
docs_read — read a documentation page
docs_read reads a single documentation page by its pageId. Pass the pageId returned by docs_list or from a search result.Use start_line and end_line to fetch a slice of a long page. The response carries totalLines so the agent can continue reading the next slice when needed.CLI usageDocumentation page ID from
docs_list or search results.Starting line (1-indexed). Omit for the full page.
Ending line (inclusive). Omit for end of page.
MCP tool reference
| MCP tool | CLI command | Purpose |
|---|---|---|
search | npx githits@latest search | Find documentation pages by topic, API, option, behavior, or error |
docs_list | npx githits@latest docs list | Browse documentation pages for a package |
docs_read | npx githits@latest docs read | Read a documentation page by page ID |