PG search parse query
pg_search_parse_queryParses a pg_search query string and returns canonical text for debugging, letting you confirm parser interpretation with lenient or AND-mode options.
Instructions
Parse a query string through pdb.parse and return its canonical text form for debugging — useful for confirming the parser interpreted a phrase as expected. lenient=True relaxes syntax checking; conjunction_mode=True treats space-separated terms as AND-joined rather than OR-joined. Requires the pg_search extension.
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_string": "<query_string>"
},
"name": "pg_search_parse_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lenient | No | ||
| 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. | |
| query_string | Yes | ||
| conjunction_mode | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parsed | Yes |