Skip to main content
Glama
MikelA92
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'], }, },

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