Skip to main content
Glama
voducdan

metabase-mcp

by voducdan

list_cards

Retrieve all saved questions and cards from Metabase with their metadata. Use this to access an overview of your analytics assets for inventory, auditing, or automation.

Instructions

List all saved questions/cards in Metabase.

Returns: Dictionary containing all cards with their metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_cards' tool. It fetches all saved questions/cards from Metabase by making a GET request to /api/card and returns the JSON response containing card metadata.
    @mcp.tool
    async def list_cards(ctx: Context) -> dict[str, Any]:
        """
        List all saved questions/cards in Metabase.
    
        Returns:
            Dictionary containing all cards with their metadata.
        """
        try:
            await ctx.info("Fetching list of saved cards/questions")
            result = await metabase_client.request("GET", "/card")
            card_count = len(result) if isinstance(result, list) else len(result.get("data", []))
            await ctx.info(f"Successfully retrieved {card_count} cards")
            return result
        except Exception as e:
            error_msg = f"Error listing cards: {e}"
            await ctx.error(error_msg)
            raise ToolError(error_msg) from e
  • server.py:427-428 (registration)
    The tool is registered with the FastMCP server via the @mcp.tool decorator on the list_cards function.
    @mcp.tool
    async def list_cards(ctx: Context) -> dict[str, Any]:
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the return type (dictionary with metadata) but does not disclose whether the tool is read-only, requires authentication, or has rate limits. For a listing tool, read-only hint is implicit but not explicit, which is insufficient for safe agent decisions.

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 extremely concise (two sentences), front-loaded with the purpose, and every sentence adds value. No redundant or verbose text. This is an exemplar of conciseness.

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?

For a tool with no parameters and no annotations, the description is minimally adequate. It states what it does and what it returns. However, it lacks any guidance on usage context or when to prefer this over siblings. The presence of an output schema likely covers return details, but the description misses behavioral cues for safe selection.

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?

The input schema has zero parameters, so baseline is 4. The description does not need to explain parameters because none exist. It correctly focuses on the action and return value.

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 action 'List all' and resource 'saved questions/cards in Metabase'. It is specific about what it returns. However, it does not distinguish from sibling tools like 'get_dashboard_cards' which also returns cards but filtered by dashboard. The purpose is clear but lacks differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_dashboard_cards' or 'list_collections'. It does not mention any prerequisites or exclusions. Agents have no context to choose the right tool among siblings.

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/voducdan/matebase-mcp'

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