Search project documents
search_docsSearch the documents uploaded to a project (policy wordings, product guides, underwriting guidelines or anything else) for the passages that answer a question about the product: what is covered or excluded, excesses, conditions, definitions, claims notice, eligibility. Takes project_reference, query (the question in plain words, or an exact term like "Section 4" or a defined term), optional version_reference (default: the latest live version, else the latest of any status; pass the version that ran $1 so the wording matches it), optional k (passages to return, default 5, max 20) and optional document_references to search only some documents. Every passage is scored by meaning (a local embedding model) and by keywords, blended 70/30. Returns { project_reference, version_reference, query, documents: { indexed, pending, failed }, results: [{ document_reference, title, filename, version_reference, chunk, page, section, text, score, similarity, keyword }], next_steps }. score is relative to this search (the best passage scores near 1); similarity is the cosine similarity to the question (below about 0.5 is rarely relevant). Answer only from the returned text, citing title, section and page; read around a passage with get_doc. Nothing is changed.
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": {
"project_reference": "<project_reference>",
"query": "<query>"
},
"name": "search_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Optional. How many passages to return, default 5, max 20. | |
| query | Yes | The question, in plain words (e.g. "is flood damage to a basement covered"), or an exact term to find (a clause number, a defined term). | |
| project_reference | Yes | UUID of the project whose documents to search. | |
| version_reference | No | Optional. The version whose documents to search: documents for every version plus any pinned to this one. Defaults to the latest live version. | |
| document_references | No | Optional. Only search these documents (from get_project's or run_quote's documents). |