Vector range search
vector_range_searchReturns rows within a maximum distance of a query vector for de-duplication, similarity gating, or clustering pre-passes; results are distance-ordered and limit-capped.
Instructions
Return every row within max_distance of a query vector (a threshold-based query rather than top-k). Useful for de-dup, similarity gating, and clustering pre-passes. Still ordered by distance and capped at limit to avoid pulling huge result sets. Reports available=false if the pgvector extension is not installed.
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": {
"schema": "<schema>",
"table": "<table>",
"column": "<column>",
"query_vector": "<query_vector>",
"max_distance": "<max_distance>"
},
"name": "vector_range_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | Yes | ||
| column | Yes | ||
| metric | No | l2 | |
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| max_distance | Yes | ||
| query_vector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| available | Yes |