Skip to main content
Glama
MikelA92
by MikelA92

get_card_with_parameters

Extract card ID and filter parameters from Metabase dashboard URLs to retrieve specific dashboard cards with applied filters for analysis.

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 decodes the provided dashboard URL to extract card ID and parameters, fetches the base card from Metabase API, and returns formatted content including 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 JSON schema definition for the tool, including input schema requiring a 'url' string parameter, description, and name. Used for tool listing and input validation in the MCP server.
    { 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'], }, },
  • The dispatch case in the MCP server's executeTool switch statement that routes calls to this tool to the dashboardHandlers.getCardWithParameters method.
    case 'get_card_with_parameters': return await this.dashboardHandlers.getCardWithParameters(args.url);

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