| name | doc-search |
| argument-hint | [library/API question] |
| description | Answer library/API/config/behavior questions from the dq MCP tools - installed doc sets, offline, cited - instead of memory or the web. Use when you are about to write or explain code that calls a third-party library or tool, or to confirm an API signature, config option, or documented behavior. To search your own source code use code-search; to add a doc set use resolve-doc-source. |
| when_to_use | Triggers on "signature of <fn> in <lib>", "how do I configure X", "what options does Y take", "does <lib> support Z", "what does <API> return", or any third-party API, config, or documented-behavior question. |
| metadata | [{"name":"dq doc index","description":"Installed doc sets searchable offline in code.db (kind='doc'); returns exact, cited library/API/config text instead of memory or the web."},{"name":"dq tools","description":"The dq MCP tools for documentation search, full record retrieval, and live re-fetch of an indexed page."},{"author":"magic-man"},{"tags":["docs","search","api","reference"]}] |
Doc Search
Answer library/API/config/behavior questions from the dq doc index - offline, cited, not from
memory or the web. Never guess an API or WebFetch when dq has the set; if it lacks it, say so.
Route: inline for a lookup, subagent for research
A fork costs ~10k tokens of setup; recall is ~6ms. So:
- One value / a few lookups - call the dq tools inline (below), answer directly.
- Heavy research (comparing sets, reading many full records, tens of thousands of tokens of churn) - dispatch
Agent(subagent_type "dq-toolkit:research", "<question>"); it works on its own context and returns a tight cited answer. Parallel questions -> one agent each.
The dq tools
The key calls:
mcp__plugin_dq-toolkit_dq__search_index(query, kind="doc", site?, category?, limit?, offset?, full?, max_chars?) - ranked hits, each with a match-centered snippet, a truncated flag, and a url; offset pages deeper and total reports the full match count. Ranking is BM25 full-text (lexical only - no semantic/vector mode).
- Pass
full=True to get each truncated hit's complete body inline; otherwise, if a hit's truncated is true, call mcp__plugin_dq-toolkit_dq__get_record(url) for the full body. To pull several bodies at once, mcp__plugin_dq-toolkit_dq__get_records(urls).
get_record(url) returns the stored body; when that record looks stale or its stored body is itself truncated, mcp__plugin_dq-toolkit_dq__fetch_doc_page(url) re-fetches that page's live text (cleaned to readable form). Only a url already in the index (paste it verbatim from a hit) - it refuses non-record and non-public addresses, and won't discover new pages.
mcp__plugin_dq-toolkit_dq__list_sources(kind="doc") - list installed doc sets.
Every tool carries a note (the doc tools wrap a results array; search_index also adds total).
Relay note to the user when present - it signals a stale source (e.g. "dq index may be stale -
pydantic (47d ago); refresh with dq-scan refresh && dq-sql index").
Put concrete identifiers in the query (function/type/config/command names, exact error text).
Scope with site (a doc set) or kind="doc".
Discipline
- Never guess a third-party API/config/behavior, and never WebFetch when dq has the set - dq returns the exact, cited text. If dq genuinely lacks it, say so (then the web is a fair fallback).
- Don't hard-code the installed set list;
mcp__plugin_dq-toolkit_dq__list_sources(kind="doc") (or list_repos) is the source of truth.
Boundaries
- Read-only. To add, repair, rebuild, or deploy a doc set, use the resolve-doc-source skill.
- To search source code (definitions, references, examples), use the code-search skill.
References