Full text search
full_text_searchRank documents in a PostgreSQL text column against a full-text query using tsvector/tsquery, with web-search syntax and relevance scores.
Instructions
Rank a text column's documents against a full-text query using PostgreSQL's built-in tsvector/tsquery. The query accepts web-search syntax (quoted phrases, or, - exclusion). Returns a list of objects with the matched row's primary key columns plus rank (ts_rank score, higher = better match).
Example: full_text_search(schema='public', table='articles', column='body', search_query='"new york" OR -draft')
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>",
"search_query": "<search_query>"
},
"name": "full_text_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | Yes | ||
| column | Yes | ||
| config | No | english | |
| 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. | |
| search_query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |