Skip to main content
Glama
im-voracity

metabase-mcp-python

by im-voracity

execute_query

Read-only

Execute native SQL on a Metabase database for custom analysis, complex queries, or data extraction beyond existing cards.

Instructions

Execute a native SQL query against a Metabase database - use this for custom data analysis, complex queries, or extracting specific data not available through existing cards

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to execute
parametersNoOptional query parameters for parameterized queries
database_idYesThe ID of the database to query against

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The annotation readOnlyHint=true already establishes that this is a read operation, so the description doesn't need to restate that. The description adds some context about purpose but does not disclose additional behavioral traits such as potential performance implications, result size limits, or permission requirements. With annotations present, a score of 3 is appropriate as it provides minimal added behavioral context.

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

Conciseness4/5

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

The description is a single sentence that is concise and front-loaded with the main action. It conveys purpose and usage efficiently without unnecessary verbosity. However, it could be split into two sentences for slightly better readability, so a score of 4 rather than 5.

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?

The tool is moderately complex (arbitrary SQL execution) and has an output schema that explains return values. The description covers the core purpose and when to use it, which is sufficient for an agent to select the tool. It doesn't mention potential caveats like query safety or runtime, but annotations and output schema fill some gaps. Overall, it is contextually complete enough for most use cases.

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?

The input schema has 100% parameter description coverage, with descriptions for query, parameters, and database_id. The tool description does not significantly add meaning beyond the schema, though it reinforces that the query is 'native SQL'. Since the schema already carries the burden, baseline 3 is justified.

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?

The description uses a specific verb ('Execute') and clearly identifies the resource ('native SQL query against a Metabase database'). It also explains the intended use cases (custom data analysis, complex queries, extracting data not available through existing cards), which distinguishes it from sibling tools like execute_card and get_table_data.

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?

The description provides clear context on when to use this tool, explicitly mentioning 'custom data analysis' and 'complex queries'. It also implies an alternative ('not available through existing cards') which suggests using saved cards for standard needs, though it doesn't name the exact sibling tool. There is no explicit 'when not to use' statement.

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/im-voracity/metabase-mcp-python'

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