MCP tools reference
Specification of the MCP tools exposed by queria mcp
The specification of the tools exposed by queria mcp. All tools return results in a shared shape:
{
"columns": ["datasource", "title"],
"rows": [["zipcode", "Zipcode"]],
"truncated": false,
"row_count": 1
}
When truncated: true, a hint field explains what to do (narrow the query / use the CLI’s --out).
list_datasets
Returns all published datasets. Takes no arguments.
search
| Argument | Type | Description |
|---|---|---|
keyword |
string (optional) | Substring-match keyword |
entry_type |
string (optional) | Filter by dataset / table / column |
limit |
int (default 50) | Maximum number of results |
columns |
string[] (optional) | Keep tables with a matching column for every condition |
keys |
string[] (optional) | Keep tables identified by one of these keys (prefecture / city / small_area / mesh / corporate_number / postal_code) |
geo |
bool (default false) | Keep tables with location data |
Searches across datasets, tables, and columns. Datasets match on title and description; tables and columns match on name, title, description, and tags. columns, keys and geo mean the same as on queria search; with any of them, keyword may be left out.
get_dataset_info
| Argument | Type | Description |
|---|---|---|
dataset |
string | Dataset name |
Returns the dataset’s metadata (license, source URL, schema list, and so on) as field / value rows. Fields whose value is NULL are omitted.
get_schema
| Argument | Type | Description |
|---|---|---|
dataset |
string | Dataset name |
Returns the dataset’s tables and views (schema name, table name, description).
get_columns
| Argument | Type | Description |
|---|---|---|
dataset |
string | Dataset name |
table |
string (optional) | Narrow down by table name |
query
| Argument | Type | Description |
|---|---|---|
sql |
string | DuckDB SQL |
max_rows |
int (default 100, max 1000) | Upper bound on returned rows |
Reference tables as <dataset>.<schema>.<table>. Datasets are attached automatically.
One call takes one statement. Several statements separated by ; are rejected (a trailing ; is fine).
query can only read Queria’s published catalogs. Besides writes, functions that read local files or fetch arbitrary URLs (read_csv, read_parquet, read_text, glob, ST_Read, and others) and dynamic SQL (query(), query_table(), json_execute_serialized_sql()) are rejected. The check walks the syntax tree with DuckDB’s parser, so calls hidden inside CTEs or subqueries are still caught. When you need unrestricted SQL — joining against local files, for example — use the CLI’s queria sql.
Results are truncated at max_rows and a payload size of about 1MB. Use the CLI for bulk extraction:
queria sql "<query>" --out result.parquet
list_docs
Lists this documentation’s pages. The way in to reading the docs without web access.
| Argument | Type | Description |
|---|---|---|
language |
string | en (default) or ja |
The columns are name / section / title / description. Pass a name straight to show_doc.
show_doc
Returns one documentation page as Markdown.
| Argument | Type | Description |
|---|---|---|
name |
string | A page name from list_docs (e.g. reference/cli) |
language |
string | en (default) or ja |
Unlike the other tools, it answers with a document rather than a table:
{
"name": "reference/cli",
"language": "en",
"markdown": "---\ntitle: CLI reference\n---\n\n## Global options\n..."
}
submit_feedback
| Argument | Type | Description |
|---|---|---|
kind |
string | dataset_request / data_issue / docs_issue / cli_issue / other |
message |
string | The report body (up to 4000 characters) |
dataset |
string (optional) | The dataset the report is about |
confirm_token |
string (optional) | Token that sends a draft the user approved |
Reports a dataset request, a data defect, or a documentation error to Queria. Unlike the other tools, it returns {"status": ...}.
This tool does not send anything without the user’s explicit permission. The user sets it with queria feedback allow, or the agent records their answer with set_feedback_consent.
status |
Meaning | What the agent should do |
|---|---|---|
consent_required |
Agent submissions are not allowed on this machine | Show the returned draft to the user, ask whether to send it, and record the answer with set_feedback_consent |
needs_approval |
The draft is held (nothing has been sent) | Show preview to the user verbatim; if they approve, call again with the confirm_token |
sent |
Stored (includes id) |
Say so once, briefly |
rejected |
Refused (includes reason) |
Fix the reason and retry if the user still agrees |
confirm_token is single-use and expires. If it is rejected, start over from preparing the draft.
When the user chose --auto, the first call sends and needs_approval is never returned. Anything sent that way is recorded as a report no human reviewed.
Never put query results, personal data, or credentials in the message. Anything that looks like a credential (the configured token, a string starting with qk_, an AWS key) results in rejected.
set_feedback_consent
| Argument | Type | Description |
|---|---|---|
mode |
string | review / auto / off |
Records whether agents may send feedback, in the config file on the user’s machine.
mode |
Meaning |
|---|---|
review |
May send, but must show each message and get approval first (recommended) |
auto |
May send without asking each time |
off |
Revoke the permission |
Only call this to write down an answer the user just gave you. An agent must never change the setting on its own initiative. It applies to every agent on that machine, so tell the user what you changed.
The user can also set it with queria feedback allow / queria feedback disallow.
