search_similar
Find documents semantically similar to an indexed reference document by comparing embeddings. Returns related filepaths and similarity scores for thematic discovery.
Instructions
Find documents semantically similar to a given reference document.
Read-only. No side effects. Uses the document's embedding for similarity comparison.
Args: filepath: Path to the reference document (must already be indexed — list_documents() lists indexed paths, one page at a time). E.g., "security/technique.md" max_results: Number of similar documents to return (default: 5, max: 20)
Returns: JSON string with list of similar document filepaths and similarity scores (0.0–1.0).
Usage: Use when you have a specific document and want to discover thematically related ones. Use search_knowledge() instead when you have a text query rather than a reference document. The reference document must be indexed; list_documents() lists indexed paths one page at a time.
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": {
"filepath": "<filepath>"
},
"name": "search_similar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |