doc_locate
Finds relevant PDF pages and snippets for a query using lexical and page-reference signals, so agents can target page reads without LLM calls.
Instructions
Locate the most relevant pages and snippets in a PDF without calling any LLM (<=1,200 tokens). Combines lexical BM25-RRF, printed page references, statement-intent boosting, and table continuations. Call after doc_outline before reading pages.
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": "doc_locate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Number of top candidate pages to return (1–10). | |
| path | No | Path to a PDF inside allowed --root directories (optional if doc_id is supplied). | |
| query | Yes | Specific search query containing key entities, metrics, table names, or clause terms. | |
| doc_id | No | Previously opened doc_id returned by doc_outline. | |
| page_range | No | Optional [start_page, end_page] 1-based physical page range to restrict search. | |
| snippet_chars | No | Maximum character length of each returned preview snippet. |