Skip to main content
Glama
suthio

Redash MCP Server

by suthio

add_dashboard_favorite

Add a dashboard to your favorites by specifying its dashboard ID. This marks the dashboard for quick access in your favorites list.

Instructions

Add a dashboard to favorites

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYesID of the dashboard to add to favorites

Implementation Reference

  • Zod schema for the add_dashboard_favorite tool, requiring a single 'dashboardId' (coerced number) parameter.
    // Tool: add_dashboard_favorite
    const addDashboardFavoriteSchema = z.object({
      dashboardId: z.coerce.number()
  • Handler function (addDashboardFavorite) that validates args via the schema, calls redashClient.addDashboardFavorite(), and returns success/error response.
    async function addDashboardFavorite(params: z.infer<typeof addDashboardFavoriteSchema>) {
      try {
        const result = await redashClient.addDashboardFavorite(params.dashboardId);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
        };
      } catch (error) {
        logger.error(`Error adding dashboard ${params.dashboardId} to favorites: ${error}`);
        return {
          isError: true,
          content: [{ type: "text", text: `Error adding dashboard ${params.dashboardId} to favorites: ${error instanceof Error ? error.message : String(error)}` }]
        };
      }
    }
  • src/index.ts:1929-1939 (registration)
    Tool registration in ListToolsRequestSchema: defines tool name 'add_dashboard_favorite', description, and inputSchema for the MCP tool listing.
    {
      name: "add_dashboard_favorite",
      description: "Add a dashboard to favorites",
      inputSchema: {
        type: "object",
        properties: {
          dashboardId: { type: "number", description: "ID of the dashboard to add to favorites" }
        },
        required: ["dashboardId"]
      }
    },
  • src/index.ts:2434-2436 (registration)
    Tool dispatch handler in CallToolRequestSchema: routes 'add_dashboard_favorite' tool calls to the addDashboardFavorite function.
    case "add_dashboard_favorite":
      logger.debug(`Handling add_dashboard_favorite`);
      return await addDashboardFavorite(addDashboardFavoriteSchema.parse(args));
  • Redash API client method addDashboardFavorite() that makes the POST request to /api/dashboards/{dashboardId}/favorite to add the dashboard to favorites.
    // Add dashboard to favorites
    async addDashboardFavorite(dashboardId: number): Promise<{ success: boolean }> {
      try {
        await this.client.post(`/api/dashboards/${dashboardId}/favorite`);
        return { success: true };
      } catch (error) {
        logger.error(`Error adding dashboard ${dashboardId} to favorites: ${error}`);
        throw new Error(`Failed to add dashboard ${dashboardId} to favorites: ${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 carries full burden. However, it only states the basic action and does not disclose behavioral traits such as whether the operation is idempotent, auth requirements, or rate limits.

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 with no wasted words. It is front-loaded with the action. However, it could be slightly expanded with structural elements like prerequisites or behavior.

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?

Given the simplicity of the tool (1 parameter, no output schema), the description is mostly adequate but lacks behavioral context like what happens if the dashboard is already favorited or if the ID is invalid.

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 includes a description for the parameter. The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

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 (Add) and target (dashboard to favorites), distinguishing it from sibling tools like remove_dashboard_favorite and get_favorite_dashboards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you want to add a dashboard to favorites) but provides no explicit guidance on when not to use it or alternatives. For a simple tool, this is adequate but not exemplary.

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