Skip to main content
Glama
metabase-mcp

metabase-mcp

by livingroot

dashboards_connect_filter

Connect a dashboard filter parameter to a native SQL card template tag so the filter affects that card's query results.

Instructions

Wire a dashboard filter parameter to a native SQL card's template tag so the filter affects that card's results. The parameter_id must match one added via dashboards_add_filter; tag_name is the {{tag_name}} variable in the card's SQL. For text/date/number tags (type='text'|'date'|'number'), use target_type='variable' (default). For dimension tags created with tag_config field_id, and for 'temporal-unit' (time grouping) tags, use target_type='dimension'.

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": {
      "dashboard_id": "<dashboard_id>",
      "dashcard_id": "<dashcard_id>",
      "parameter_id": "<parameter_id>",
      "tag_name": "<tag_name>"
    },
    "name": "dashboards_connect_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
tag_nameYesThe SQL template-tag variable name (the {{tag_name}} in the card's native SQL)
dashcard_idYesDashcard placement ID of the card to wire (NOT the card_id)
target_typeNoTarget mapping type. Omit to auto-detect: the tool reads the card's template tag and picks 'dimension' for Field Filter tags, 'variable' for text/date/number tags. Pass explicitly only to override auto-detection.
dashboard_idYesDashboard ID
parameter_idYesThe dashboard parameter_id to connect (must match one from dashboards_add_filter)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the prerequisite chain and that target_type is auto-detected when omitted, but it never says whether an existing mapping is overwritten, whether the operation is idempotent, or what happens if the tag name is not found in the card's SQL.

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 the purpose before the prerequisite and the type-selection rules. Every sentence supplies information an agent needs; there is no restating of the tool name or filler.

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?

For a five-parameter mutation tool with no annotations and no output schema, the description covers purpose, prerequisite, and the non-obvious type branching well. It leaves a modest gap around the result of the call and failure/overwrite behavior, which matters more here because nothing else documents it.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, and the description goes beyond it by tying parameter_id to dashboards_add_filter and by spelling out which tag families require target_type='dimension' versus 'variable'. It does not add anything further about dashboard_id or dashcard_id beyond the schema's 'NOT the card_id' note.

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 opens with a specific verb and resource: 'Wire a dashboard filter parameter to a native SQL card's template tag so the filter affects that card's results.' It clearly distinguishes this wiring step from dashboards_add_filter, which only creates the parameter, so an agent can tell the two apart 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 Guidelines5/5

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

It states an explicit prerequisite ('parameter_id must match one added via dashboards_add_filter') and gives conditional routing: target_type='variable' (the default) for text/date/number tags, 'dimension' for field-filter tags and 'temporal-unit' tags. That is concrete when-to-use guidance rather than inference.

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