Skip to main content
Glama

execute_query

Read-only

Run SELECT queries on Metabase databases to retrieve and analyze data directly through SQL commands.

Instructions

Execute a SQL query (SELECT statements only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesDatabase ID to query
sqlYesSQL query (SELECT statements only)
Behavior3/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, indicating safe, non-destructive operations with potential for varied outputs. The description adds the constraint 'SELECT statements only', reinforcing read-only behavior, but doesn't disclose additional traits like rate limits, error handling, or result formatting. It aligns with annotations without contradiction but offers minimal extra context.

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?

The description is a single, efficient sentence with zero wasted words—it directly states the action and key constraint. It's front-loaded and appropriately sized for the tool's complexity, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema), the description covers the basic purpose and constraint. However, it lacks details on behavioral aspects like result format or error cases, which could be helpful despite annotations. It's adequate but has clear gaps in providing a full operational picture.

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%, with clear descriptions for both parameters (database_id and sql). The description adds semantic context by reiterating 'SELECT statements only' for the sql parameter, but this is partially redundant with the schema. It doesn't provide additional meaning beyond what the schema already covers, so it meets the baseline.

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 the verb ('Execute') and resource ('SQL query') with a specific constraint ('SELECT statements only'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'execute_card' or 'search_content', which might also involve query-like operations, so it doesn't reach the highest score.

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 by specifying 'SELECT statements only', which suggests when to use it (for read-only queries) but doesn't explicitly state when not to use it or name alternatives. For example, it doesn't clarify if this is for raw SQL vs. other query methods in sibling tools, leaving some ambiguity.

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/1luvc0d3/metabase-mcp'

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