Skip to main content
Glama
suthio

Redash MCP Server

by suthio

share_dashboard

Generates a public link to share a dashboard by providing its ID.

Instructions

Share a dashboard and create a public link

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYesID of the dashboard to share

Implementation Reference

  • MCP tool handler function for share_dashboard. Validates input via shareDashboardSchema, calls redashClient.shareDashboard(), and returns the public_url and api_key or an error.
    async function shareDashboard(params: z.infer<typeof shareDashboardSchema>) {
      try {
        const result = await redashClient.shareDashboard(params.dashboardId);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
        };
      } catch (error) {
        logger.error(`Error sharing dashboard ${params.dashboardId}: ${error}`);
        return {
          isError: true,
          content: [{ type: "text", text: `Error sharing dashboard ${params.dashboardId}: ${error instanceof Error ? error.message : String(error)}` }]
        };
      }
    }
  • Zod schema for share_dashboard tool input validation. Expects a single dashboardId (coerced to number).
    const shareDashboardSchema = z.object({
      dashboardId: z.coerce.number()
    });
  • src/index.ts:1885-1895 (registration)
    MCP tool registration for share_dashboard in the ListToolsRequestSchema handler, defining its name, description, and input schema.
    {
      name: "share_dashboard",
      description: "Share a dashboard and create a public link",
      inputSchema: {
        type: "object",
        properties: {
          dashboardId: { type: "number", description: "ID of the dashboard to share" }
        },
        required: ["dashboardId"]
      }
    },
  • src/index.ts:2418-2420 (registration)
    Call routing for share_dashboard in the CallToolRequestSchema handler. Parses arguments with shareDashboardSchema and delegates to the shareDashboard handler function.
    case "share_dashboard":
      logger.debug(`Handling share_dashboard`);
      return await shareDashboard(shareDashboardSchema.parse(args));
  • RedashClient helper method that POSTs to /api/dashboards/{dashboardId}/share to create a public link for the dashboard. Returns public_url and api_key.
    async shareDashboard(dashboardId: number): Promise<{ public_url: string; api_key: string }> {
      try {
        const response = await this.client.post(`/api/dashboards/${dashboardId}/share`);
        return response.data;
      } catch (error) {
        logger.error(`Error sharing dashboard ${dashboardId}: ${error}`);
        throw new Error(`Failed to share 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 are provided, so the description should disclose behavioral traits. It mentions creating a public link but does not explain side effects like dashboard visibility changes, link expiration, or required permissions. This is insufficient for a write operation.

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 a single sentence with no unnecessary words. It is concise and front-loaded.

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?

The tool is simple with one parameter and no output schema. The description is adequate but lacks details such as the format of the public link or confirmation of success. It minimally meets the needs but could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with a description for 'dashboardId'. The tool description adds no additional meaning beyond what the schema already provides, simply restating the parameter's role.

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 action 'share', the resource 'dashboard', and the outcome 'create a public link'. It distinguishes from sibling tools like 'unshare_dashboard' and 'archive_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 'unshare_dashboard', or prerequisites such as ownership or permissions. The description lacks context for appropriate usage.

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