Skip to main content
Glama
suthio

Redash MCP Server

by suthio

remove_alert_subscription

Unsubscribe from a Redash alert by providing the alert ID and subscription ID to remove the subscription.

Instructions

Unsubscribe from an alert

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alertIdYesID of the alert
subscriptionIdYesID of the subscription to remove

Implementation Reference

  • MCP tool handler for 'remove_alert_subscription' - validates inputs with Zod schema, calls the Redash client to remove the subscription, and returns the result or an error.
    async function removeAlertSubscription(params: z.infer<typeof removeAlertSubscriptionSchema>) {
      try {
        const result = await redashClient.removeAlertSubscription(params.alertId, params.subscriptionId);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
        };
      } catch (error) {
        logger.error(`Error removing subscription ${params.subscriptionId} from alert ${params.alertId}: ${error}`);
        return {
          isError: true,
          content: [{ type: "text", text: `Error removing subscription ${params.subscriptionId} from alert ${params.alertId}: ${error instanceof Error ? error.message : String(error)}` }]
        };
      }
    }
  • Zod schema for remove_alert_subscription inputs: requires alertId (number) and subscriptionId (number).
    const removeAlertSubscriptionSchema = z.object({
      alertId: z.coerce.number(),
      subscriptionId: z.coerce.number()
    });
  • src/index.ts:2074-2085 (registration)
    Registration of the 'remove_alert_subscription' tool in the ListToolsRequestSchema handler, declaring its name, description, and JSON Schema input definition.
    {
      name: "remove_alert_subscription",
      description: "Unsubscribe from an alert",
      inputSchema: {
        type: "object",
        properties: {
          alertId: { type: "number", description: "ID of the alert" },
          subscriptionId: { type: "number", description: "ID of the subscription to remove" }
        },
        required: ["alertId", "subscriptionId"]
      }
    },
  • src/index.ts:2479-2481 (registration)
    Routing of the 'remove_alert_subscription' tool name to its handler in the CallToolRequestSchema switch statement.
    case "remove_alert_subscription":
      logger.debug(`Handling remove_alert_subscription`);
      return await removeAlertSubscription(removeAlertSubscriptionSchema.parse(args));
  • Redash API client helper method that performs the DELETE HTTP request to /api/alerts/{alertId}/subscriptions/{subscriptionId} to remove the alert subscription.
    // Remove alert subscription
    async removeAlertSubscription(alertId: number, subscriptionId: number): Promise<{ success: boolean }> {
      try {
        await this.client.delete(`/api/alerts/${alertId}/subscriptions/${subscriptionId}`);
        return { success: true };
      } catch (error) {
        logger.error(`Error removing subscription ${subscriptionId} from alert ${alertId}: ${error}`);
        throw new Error(`Failed to remove subscription ${subscriptionId} from alert ${alertId}: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
Behavior2/5

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

With no annotations, the description lacks behavioral details such as idempotency, error handling (e.g., subscription not found), ownership requirements, or whether the action is irreversible. The minimal description does not compensate for the absence of annotations.

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 extremely concise with a single sentence, front-loading the key action. However, it sacrifices some completeness for brevity; a slightly longer description could improve clarity without losing conciseness.

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 simplicity of the tool (2 required params, no output schema), the description is insufficient for safe usage. It fails to mention what happens upon removal, error states, or how to obtain the required IDs, leaving significant gaps in context.

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?

The input schema covers both parameters with clear descriptions (alertId and subscriptionId), and the description adds no additional semantics beyond the schema. Since schema coverage is 100%, a baseline of 3 is appropriate.

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 'Unsubscribe from an alert' clearly indicates the action (unsubscribe) and resource (alert subscription), effectively distinguishing it from sibling tools like add_alert_subscription and get_alert_subscriptions. However, it could be more specific about removing a subscription by ID rather than just unsubscribing.

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 such as delete_alert or mute_alert. There is no mention of prerequisites (e.g., needing to obtain the subscription ID via get_alert_subscriptions) or exclusions, leaving the agent uncertain about proper 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