The MCP docs tool and the overlane docs commands share one contract: for the same input they return the same JSON. An agent uses whichever its client offers.
Ask a question
overlane docs query acme-widgets "how do I create a widget" --project prj_1 --jsonThe MCP call has the same fields:
{ "name": "docs", "arguments": { "tenantId": "TEAM", "operation": "query", "library": "acme-widgets", "q": "how do I create a widget", "projectId": "prj_1" } }The version is chosen in this order: --version, then the project’s pin from its lockfile, then the latest version the library’s source documents. The answer’s versionSource says which one applied.
Each snippet has version, sourceUrl, fetchedAt, ageDays, a stale flag and a label that marks the text as third-party data. status is one of ok, indexed_on_demand (the library was fetched for this call), pin_unavailable, blocked and no_match.
Snippets are ranked by keyword match (BM25) over the chunks of the one version being asked about. The ranking is deterministic: the same index and question give the same order, and nothing is sent to a model to answer a question. An embedding re-rank can be switched on by the operator; it only reorders the keyword matches and is skipped if it fails.
Index and refresh
overlane docs index react --version 18.3.1
overlane docs index acme-widgets --project prj_1 --refresh--refresh fetches again and re-indexes only when the text changed. A scheduled freshness job does the same for indexes older than 7 days, so an agent rarely needs to; an index older than 30 days is labelled stale with its age. --dry-run prints the plan without fetching anything.
See what is indexed
overlane docs libraries
overlane docs deps --project prj_1The other operations of the tool are index, private, pins, dependencies, libraries and usage. Each is also an HTTP endpoint: query, index, pins, dependencies and usage are in the API reference.
Command reference: overlane docs query, index, pins, deps, add, usage and libraries.