search_docs
Search documentation snippets for a library. Filter by library ID and optional version to find relevant code examples.
Instructions
Search documentation snippets for a library. Filter by library via lib_id (base form like /hashicorp/terraform). Pass version alongside lib_id to pin to a specific version (e.g. v1.14); omit version to search across all indexed versions of the lib. version without lib_id is rejected.
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_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | the search query | |
| lib_id | No | base library ID in /org/project format (optional) | |
| version | No | version tag to filter by (optional; requires lib_id) | |
| tokens | No | max tokens to return, min 1000, default 5000 (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| snippets | Yes |