Skip to main content
Glama
MikelA92

Metabase MCP Server

by MikelA92

get_card_with_parameters

Extract card ID and applied parameters from Metabase dashboard URLs with filters for analysis or integration purposes.

Instructions

🔗 [SAFE] Get a card with applied parameters from dashboard URL. Use this to extract card ID and parameters from Metabase dashboard URLs with filters. Risk: None - read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe full Metabase dashboard URL with encoded parameters

Implementation Reference

  • The main handler function that implements the get_card_with_parameters tool. It decodes the provided dashboard URL, fetches the base card information from the Metabase API, and returns formatted details including applied parameters, dataset query, and visualization settings.
      async getCardWithParameters(url) {
        Validators.validateUrl(url);
        
        this.logger.debug('Getting card with parameters from URL');
        
        const decoded = DashboardUrlDecoder.decode(url);
        const baseCard = await this.apiClient.makeRequest(`/api/card/${decoded.originalCardId}`);
        
        return {
          content: [
            {
              type: 'text',
              text: `Card with Parameters:
    Original Card ID: ${decoded.originalCardId}
    Card Name: ${baseCard.name}
    Description: ${baseCard.description || 'No description'}
    Database ID: ${baseCard.dataset_query?.database}
    Query Type: ${baseCard.dataset_query?.type}
    Display Type: ${decoded.display}
    
    Applied Parameters:
    ${JSON.stringify(decoded.parameters, null, 2)}
    
    Dataset Query:
    ${JSON.stringify(decoded.datasetQuery, null, 2)}
    
    Visualization Settings:
    ${JSON.stringify(decoded.visualizationSettings, null, 2)}`,
            },
          ],
        };
      }
  • The switch case in the executeTool method that routes calls to the 'get_card_with_parameters' tool to the appropriate dashboard handler.
    case 'get_card_with_parameters':
      return await this.dashboardHandlers.getCardWithParameters(args.url);
  • The tool definition including name, description, and input schema (requires 'url' parameter) used for MCP tool registration and validation.
      name: 'get_card_with_parameters',
      description: '🔗 [SAFE] Get a card with applied parameters from dashboard URL. Use this to extract card ID and parameters from Metabase dashboard URLs with filters. Risk: None - read-only operation.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'The full Metabase dashboard URL with encoded parameters',
          },
        },
        required: ['url'],
      },
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively adds context beyond basic functionality: it explicitly states 'Risk: None - read-only operation' and marks it as '[SAFE]', clarifying safety and permissions. However, it does not detail rate limits, error handling, or output format, leaving some behavioral aspects uncovered.

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 front-loaded with key information (action, resource, safety) in three concise sentences. Each sentence earns its place: the first states the purpose, the second provides usage context, and the third clarifies risk. There is no wasted text, making it highly efficient and well-structured.

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?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, and safety adequately. However, it lacks details on the return value (e.g., what 'card ID and parameters' look like) and any prerequisites (e.g., URL format requirements), which could be helpful for full contextual understanding.

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?

The input schema has 100% description coverage, with the 'url' parameter documented as 'The full Metabase dashboard URL with encoded parameters'. The description adds marginal value by reinforcing the parameter's purpose ('from dashboard URL' and 'Metabase dashboard URLs with filters'), but does not provide additional syntax, format examples, or constraints beyond what the schema already states.

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 clearly states the specific action ('Get a card with applied parameters') and resource ('from dashboard URL'), distinguishing it from siblings like 'get_card' (which likely retrieves card metadata without parameters) and 'execute_card_query' (which executes queries). The mention of extracting 'card ID and parameters from Metabase dashboard URLs with filters' adds precise scope.

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?

The description provides clear context for when to use this tool ('Use this to extract card ID and parameters from Metabase dashboard URLs with filters'), but does not explicitly state when not to use it or name alternatives among siblings (e.g., 'get_card' for unfiltered cards or 'execute_card_query' for running queries). The guidance is helpful but lacks exclusions.

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/MikelA92/metabase-mcp-mab'

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