Skip to main content
Glama
Arkanji

metabase-mcp-server

by Arkanji

run_native_query

Run a read-only native SQL query against a Metabase database. Enforces a LIMIT clause and rejects write or multi-statement queries.

Instructions

Run a native SQL query against a Metabase database. Requires that your API key has native query (SQL) permission in Metabase. IMPORTANT: You must include a LIMIT clause in your SQL to avoid large result sets. Write operations (INSERT, UPDATE, DELETE, DROP, etc.) and multi-statement queries are rejected. The server strips SQL comments before validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to execute. Include a LIMIT clause to control result size.
database_idYesThe database ID
Behavior4/5

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

With no annotations provided, the description takes on the full burden of behavioral disclosure. It reveals important traits: permission requirements, mandatory LIMIT, rejection of write operations and multi-statement queries, and comment stripping. This goes well beyond the schema. It does not mention return format or pagination, which would push it to a 5.

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 sentences, front-loaded with purpose, and every sentence provides essential information: what it does, permission requirement, LIMIT warning, and rejection rules. No filler or redundancy.

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?

Given no output schema and no annotations, the description covers permissions, query constraints, and validation behavior, making it largely complete for a safe read-only SQL tool. It omits explicit mention of return format, but for a SQL query tool this is often implied. The lack of output schema slightly reduces completeness.

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%, so the baseline is 3. The schema already documents both parameters (query with LIMIT advice, database_id). The description's mention of LIMIT and write rejection adds context but not parameter-level detail beyond what the schema provides.

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

Purpose4/5

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

The description clearly states 'Run a native SQL query against a Metabase database' – a specific verb and resource. It is clear in intent, but it does not explicitly distinguish itself from sibling tools like query_dataset or run_saved_question, so it falls short of a 5.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning required permissions, LIMIT clause, and rejected operations, but it does not explicitly state when to prefer this tool over alternatives such as query_dataset or run_saved_question. There is no when-not-to-use or alternative recommendation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arkanji/metabase-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server