Skip to main content
Glama
metabase-mcp

metabase-mcp

by livingroot

dashboards_add_filter

Add a filter parameter to a dashboard, set its type and dropdown source, then reuse the unique parameter ID to wire it to cards.

Instructions

Add a filter parameter to a dashboard. Provide a unique parameter_id string; reuse the same parameter_id in dashboards_connect_filter to wire it to a card. Use values_source_type to control the dropdown source: 'static-list' for a fixed list, 'card' for values from a saved question, 'fields' for values from connected fields (requires a dimension tag_config on the card).

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>",
      "parameter_id": "<parameter_id>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "dashboards_add_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name for the filter, e.g. 'Status'
slugNoURL slug for the filter. Optional — derived from name; falls back to parameter_id when the name has no Latin letters/digits (e.g. Cyrillic).
typeYesFilter type. 'temporal-unit' is the 'Time grouping' widget: connect it to a card's 'temporal-unit' template tag (native SQL) to switch day/week/month/etc.
defaultNoDefault value, e.g. "week" for a temporal-unit filter or "2026-01-01~2026-12-31" for date/range.
dashboard_idYesDashboard ID
parameter_idYesUnique string ID for this parameter (reuse it verbatim in dashboards_connect_filter)
values_source_typeNoWhere dropdown values come from. 'static-list': fixed list (provide values_source_config.values). 'card': from a saved question (provide values_source_config.card_id + value_field). 'fields': auto-derive from connected dimension field — equivalent to omitting this parameter (Metabase does not accept 'fields' as an API value; the server omits it automatically). Omit to let Metabase derive values from the connected field.
values_source_configNoConfig for the values source. For 'static-list': {"values": [["opt1"], ["opt2"]]}. For 'card': {"card_id": 123, "value_field": ["field", <field_id>, null]}. For 'fields': {} or omit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose meaningful behavior: the parameter_id must be unique and is the join key to the connect step, and the 'fields' source requires a dimension tag_config on the card. It stops short of describing permissions, failure modes, or what happens on ID collision.

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 action, then the required ID discipline, then the dropdown-source options. No filler and no repetition of schema-documented fields.

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 an 8-parameter mutation with a nested config object and no output schema, the description covers the workflow and the one non-obvious parameter family (values_source_type). Remaining details such as name, type, slug, and default are fully documented in the schema, so nothing critical is missing.

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 100%, so the baseline is 3; the description earns above that by explaining the cross-tool meaning of parameter_id and the intent of values_source_type. One caveat: it presents 'fields' as a value to supply, while the schema states the server does not accept 'fields' as an API value and omits it automatically, so the two are in mild tension.

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 first sentence gives a specific verb and resource ('Add a filter parameter to a dashboard'), and the second immediately distinguishes this tool from its sibling by assigning the wiring step to dashboards_connect_filter. An agent can tell exactly what this call accomplishes versus the connect step without opening a schema.

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?

It states the two-step workflow explicitly: create the filter here with a unique parameter_id, then reuse that same ID in dashboards_connect_filter to attach it to a card. That is strong routing guidance, but there is no explicit statement of when not to use this tool (e.g. updating an existing filter, which would belong to dashboards_update).

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