Skip to main content
Glama
metabase-mcp

metabase-mcp

by livingroot

queries_export

Export full query results as raw CSV via Metabase, bypassing the 2,000-row JSON cap. Returns complete result sets with no row limit.

Instructions

Export a full query result set as raw CSV text via /api/dataset/csv. Bypasses the 2,000-row JSON cap that queries_execute_sql hits. Returns the complete result set with no row limit.

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": {
      "database_id": "<database_id>",
      "sql": "<sql>"
    },
    "name": "queries_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL query to export
parametersNoFilter parameters for {{template_tag}} placeholders in SQL
database_idYesMetabase database ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the disclosure burden and does well: it names the endpoint, states the output is raw CSV text, and surfaces the key behavioral trait (no row limit, bypasses the JSON cap). It omits practical consequences of an unbounded export such as payload size or cost, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and then the differentiating constraint. Every sentence carries information and none repeat structured fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so describing the return value matters and the description does so ('raw CSV text'). Combined with full schema coverage and a simple three-parameter shape, this is nearly complete; only the size/practical limits of an uncapped export are unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each of the three parameters (sql, parameters, database_id) is documented in the schema, so the baseline is 3. The description adds no parameter-level meaning such as whether SQL must be a SELECT or how template tags behave beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Export a full query result set as raw CSV text') and immediately contrasts with the sibling queries_execute_sql and its 2,000-row cap, so an agent can distinguish the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear condition that selects this tool over the alternative: when the result set exceeds the 2,000-row JSON cap or the complete set is needed. It stops short of an explicit 'use queries_execute_sql for small results' exclusion, but the routing signal is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.