概要

Search docs

MCPsearch_docs
READ$0.00009 / call
Features

LITERAL-string search over the workspace's documentation files — for an exact token you already know: an error message, a CLI flag, a config key, a regex, a file path. In 'text' mode on a project with a semantic index the literal matches are fused with the index's meaning matches (engine: "hybrid"), so a section worded differently still surfaces; without an index it matches words only (engine: "literal"). Still NOT for a question or a topic ('where do we describe…', 'find the page about…', «где у нас описано», «найди в документации») — that is search_project_docs, which takes the whole question, splits it into its parts and ranks pages by MEANING; do not hunt for an answer here mode by mode. Modes: 'text' (default — full-text with snippets, hybrid when indexed), 'grep' (regex), 'symbol' (fuzzy heading match), 'paths' (glob over file paths). Returns numbered hits {n, title, headingPath, snippet, url}: 280-character snippets, not pages — call read_project_doc for the whole page before editing it. Available to any token regardless of read/write scope.

Input4
Authorizationheaderrequired
Your API key, for the REST call. Sent from your browser straight to the API — never to Docsbook, never stored.
workspace_idstring
Workspace ID (optional when MCP endpoint is auto-scoped). Numeric workspace id — OR the project as the user names it: 'owner/repo', the repo name alone, the site's display name, its docs URL or custom domain. Text is resolved server-side; an ambiguous name returns the candidates instead of guessing, so pass what the user said rather than calling list_workspaces first.
querystringrequired
What to find. For 'text'/'grep' a phrase or pattern; for 'symbol' a heading hint; for 'paths' a glob.
modestring
Search mode (default 'text'). One of: text, grep, symbol, paths.
path_prefixstring
Optional: restrict 'text'/'grep' results to files under this path prefix.
Output5
modestring
text | grep | symbol | paths.
docs_languagestring
null
countnumber
resultsobject[]
{ n, title, headingPath, snippet, url, path }.
notestring
Example input
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_docs",
    "arguments": {
      "query": "<query>",
      "mode": "text"
    }
  }
}
Example output
{
  "mode": "<mode>",
  "docs_language": "<docs_language>",
  "count": 0,
  "results": [],
  "note": "<note>"
}

更新日

このページは役に立ちましたか?