Skip to main content
Glama
suthio

Redash MCP Server

by suthio

fork_dashboard

Duplicate an existing Redash dashboard by providing its ID. Create a copy to modify or reuse without affecting the original.

Instructions

Fork (duplicate) an existing dashboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYesID of the dashboard to fork

Implementation Reference

  • The MCP tool handler function for fork_dashboard. Validates input with forkDashboardSchema, calls redashClient.forkDashboard(), and returns the result as JSON text.
    async function forkDashboard(params: z.infer<typeof forkDashboardSchema>) {
      try {
        const result = await redashClient.forkDashboard(params.dashboardId);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
        };
      } catch (error) {
        logger.error(`Error forking dashboard ${params.dashboardId}: ${error}`);
        return {
          isError: true,
          content: [{ type: "text", text: `Error forking dashboard ${params.dashboardId}: ${error instanceof Error ? error.message : String(error)}` }]
        };
      }
    }
  • Zod schema for fork_dashboard input validation. Expects a single 'dashboardId' field which is coerced to a number.
    const forkDashboardSchema = z.object({
      dashboardId: z.coerce.number()
    });
  • src/index.ts:1863-1873 (registration)
    Tool registration in the ListToolsRequestSchema handler. Declares fork_dashboard with its name, description, and JSON Schema input.
    {
      name: "fork_dashboard",
      description: "Fork (duplicate) an existing dashboard",
      inputSchema: {
        type: "object",
        properties: {
          dashboardId: { type: "number", description: "ID of the dashboard to fork" }
        },
        required: ["dashboardId"]
      }
    },
  • src/index.ts:2410-2412 (registration)
    Tool dispatch in CallToolRequestSchema handler. Routes the 'fork_dashboard' tool name to the forkDashboard handler function with schema validation.
    case "fork_dashboard":
      logger.debug(`Handling fork_dashboard`);
      return await forkDashboard(forkDashboardSchema.parse(args));
  • The RedashClient method that makes the actual HTTP POST request to /api/dashboards/{dashboardId}/fork to fork a dashboard. It returns the forked dashboard data.
    async forkDashboard(dashboardId: number): Promise<RedashDashboard> {
      try {
        const response = await this.client.post(`/api/dashboards/${dashboardId}/fork`);
        return response.data;
      } catch (error) {
        logger.error(`Error forking dashboard ${dashboardId}: ${error}`);
        throw new Error(`Failed to fork dashboard ${dashboardId}: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
Behavior2/5

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

No annotations exist, so the description carries full burden. It only says 'duplicate' without explaining behavioral traits such as whether it's a deep copy, what happens to the original, permissions needed, or response details. This is insufficient for a mutation tool.

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, efficient sentence. While it could include more detail without becoming verbose, it is not overly terse and gets the main point across. However, it is not front-loaded with critical distinguishing info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has a simple input and no output schema, the description fails to specify what the tool returns (e.g., new dashboard ID) or whether the fork includes widgets/layout. This incompleteness could cause incorrect usage.

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 coverage is 100%, and the parameter 'dashboardId' is described in the schema as 'ID of the dashboard to fork'. The description adds no extra meaning beyond this, so it meets the baseline but does not enhance understanding.

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 explicitly states the action (fork/duplicate) and the resource (dashboard). It distinguishes from 'create_dashboard' (new from scratch) and 'archive_dashboard' (delete) by specifying duplication of an existing dashboard.

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 is provided on when to use this tool versus alternatives like 'create_dashboard' or 'fork_query'. There are no prerequisites or when-not-to-use indications, leaving the agent to infer usage context.

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