All tools

Query tables and metrics

Runs a query against a table or saved metric through the semantic layer and returns the results.

View on GitHub
Updated Sep 27, 2026Available asMCPAPI

Description

The API returns at most 200 rows per request, with a `continuation_token` to pass back for the next page.

query-metrics.md

Query tables and metrics

Runs a query against a table or saved metric through the semantic layer and returns the results.

The API returns at most 200 rows per request, with a continuation_token to pass back for the next page.

Set up

Use the first option your agent supports.

MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

{ "mcpServers": { "metabase": { "url": "https://{your-metabase-url}/api/metabase-mcp" } } }

Call the MCP tool query.

Server URL: https://{your-metabase-url}/api/metabase-mcp

API (official)

Before doing anything else, make one read-only call to confirm access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data.
  • Never print API keys.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
MCPOfficial · remotequeryOAuthDocs
APIOfficialPOST /api/agent/v1/queryAPI key in $METABASE_API_KEYDocs

Workflows using Query tables and metrics

No workflows yet
No published workflow uses Query tables and metrics yet.