Skip to main content
Glama
suthio

Redash MCP Server

by suthio

get_dashboard

Retrieve details of a specific dashboard by providing its ID.

Instructions

Get details of a specific dashboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYesID of the dashboard to get

Implementation Reference

  • Schema definition and handler function for the 'get_dashboard' tool. The schema requires a 'dashboardId' (coerced to number). The handler calls redashClient.getDashboard(dashboardId) and returns the dashboard data as JSON.
    // Tool: get_dashboard
    const getDashboardSchema = z.object({
      dashboardId: z.coerce.number()
    });
    
    async function getDashboard(params: z.infer<typeof getDashboardSchema>) {
      try {
        const { dashboardId } = params;
        const dashboard = await redashClient.getDashboard(dashboardId);
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(dashboard, null, 2)
            }
          ]
        };
      } catch (error) {
        console.error(`Error getting dashboard ${params.dashboardId}:`, error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error getting dashboard ${params.dashboardId}: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • src/index.ts:1723-1733 (registration)
    Registration of the 'get_dashboard' tool in the ListToolsRequestSchema handler, including its name, description, and inputSchema (requiring dashboardId).
    {
      name: "get_dashboard",
      description: "Get details of a specific dashboard",
      inputSchema: {
        type: "object",
        properties: {
          dashboardId: { type: "number", description: "ID of the dashboard to get" }
        },
        required: ["dashboardId"]
      }
    },
  • src/index.ts:2368-2370 (registration)
    The CallToolRequestSchema switch case that routes 'get_dashboard' tool calls to the getDashboard handler with schema validation.
    case "get_dashboard":
      logger.debug(`Handling get_dashboard`);
      return await getDashboard(getDashboardSchema.parse(args));
  • The underlying redashClient.getDashboard() method that makes the actual HTTP GET request to /api/dashboards/{dashboardId} and returns a RedashDashboard.
    async getDashboard(dashboardId: number): Promise<RedashDashboard> {
      try {
        const response = await this.client.get(`/api/dashboards/${dashboardId}`);
        return response.data;
      } catch (error) {
        console.error(`Error fetching dashboard ${dashboardId}:`, error);
        throw new Error(`Failed to fetch dashboard ${dashboardId} from Redash`);
      }
    }
  • The RedashDashboard interface defining the shape of the dashboard data returned by the get_dashboard tool.
    export interface RedashDashboard {
      id: number;
      name: string;
      slug: string;
      tags: string[];
      is_archived: boolean;
      is_draft: boolean;
      created_at: string;
      updated_at: string;
      version: number;
      dashboard_filters_enabled: boolean;
      widgets: Array<{
        id: number;
        visualization?: {
          id: number;
          type: string;
          name: string;
          description: string;
          options: any;
          query_id: number;
        };
        text?: string;
        width: number;
        options: any;
        dashboard_id: number;
      }>;
    }
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 says 'get details', with no mention of read-only nature, permissions, response format, or pagination. For a read operation, minimal behavioral context is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 6 words, very concise. No extraneous information. However, it could be slightly more descriptive without harming 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 simple tool with one parameter and no output schema, the description adequately states the purpose. However, without describing the return value, an agent may not know what to expect. Additional context like 'returns dashboard object with all fields' would improve completeness.

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?

Schema description coverage is 100%, with dashboardId described as 'ID of the dashboard to get'. The description adds no new meaning beyond the schema. Baseline 3 applies.

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 the action (Get) and resource (dashboard details). It distinguishes from siblings like list_dashboards (list all) and get_dashboard_by_slug (alternative lookup) by indicating it retrieves a specific dashboard via ID. However, it could be more specific about what 'details' includes.

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?

No guidance on when to use this tool versus alternatives like get_dashboard_by_slug or list_dashboards. The intended use case (when you have a dashboard ID) is only implied by the parameter, not explicitly stated.

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/suthio/redash-mcp'

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