query_tables
Execute SQL queries on document-extracted tables stored in DuckDB. Use COUNT, GROUP BY, JOIN, and WHERE to analyze structured data without manual extraction.
Instructions
Execute a SQL query on extracted tables stored in DuckDB.
Use list_tables() first to discover available table names and
column schemas. Supports COUNT, GROUP BY, JOIN, WHERE, etc.
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": {
"sql": "<sql>"
},
"name": "query_tables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||