Skip to main content
Glama
suthio

Redash MCP Server

by suthio

update_visualization

Update an existing visualization by specifying its ID and optionally changing its type, name, description, or configuration options.

Instructions

Update an existing visualization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
visualizationIdYesID of the visualization to update
typeNoType of visualization. Available types depend on your Redash instance.
nameNoName of the visualization
descriptionNoDescription of the visualization
optionsNoVisualization-specific configuration. The structure depends on your Redash instance and visualization type. Use get_visualization to see the current configuration before updating.

Implementation Reference

  • TypeScript interface defining the request body shape for updating a visualization. All fields are optional since it's a partial update.
    export interface UpdateVisualizationRequest {
      type?: string;
      name?: string;
      description?: string;
      options?: any;
    }
  • Main handler function for the update_visualization MCP tool. Extracts visualizationId from params, delegates to redashClient.updateVisualization, and returns the result as JSON text content.
    async function updateVisualization(params: z.infer<typeof updateVisualizationSchema>) {
      try {
        const { visualizationId, ...updateData } = params;
        const result = await redashClient.updateVisualization(visualizationId, updateData);
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        console.error(`Error updating visualization ${params.visualizationId}:`, error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error updating visualization ${params.visualizationId}: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • Zod schema defining and validating the input parameters for the update_visualization tool. Requires visualizationId; type, name, description, and options are optional.
    const updateVisualizationSchema = z.object({
      visualizationId: z.coerce.number(),
      type: z.string().optional(),
      name: z.string().optional(),
      description: z.string().optional(),
      options: z.any().optional()
    });
  • src/index.ts:1783-1797 (registration)
    Registration in the ListToolsRequestSchema handler, exposing the tool name, description, and input schema to MCP clients.
    {
      name: "update_visualization",
      description: "Update an existing visualization",
      inputSchema: {
        type: "object",
        properties: {
          visualizationId: { type: "number", description: "ID of the visualization to update" },
          type: { type: "string", description: "Type of visualization. Available types depend on your Redash instance." },
          name: { type: "string", description: "Name of the visualization" },
          description: { type: "string", description: "Description of the visualization" },
          options: { type: "object", description: "Visualization-specific configuration. The structure depends on your Redash instance and visualization type. Use get_visualization to see the current configuration before updating." }
        },
        required: ["visualizationId"]
      }
    },
  • API client helper method that sends a POST request to /api/visualizations/{id} with the update data.
    async updateVisualization(visualizationId: number, data: UpdateVisualizationRequest): Promise<RedashVisualization> {
      try {
        const response = await this.client.post(`/api/visualizations/${visualizationId}`, data);
        return response.data;
      } catch (error) {
        console.error(`Error updating visualization ${visualizationId}:`, error);
        throw new Error(`Failed to update visualization ${visualizationId}`);
      }
    }
Behavior2/5

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

No annotations provided; description fails to disclose behavioral traits such as required permissions, side effects on dashboards, or data mutability. Only says 'existing', which is implied by the name.

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

Conciseness3/5

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

Extremely concise (one sentence) but under-specified. While not verbose, it sacrifices informativeness. A slightly longer description with key details would be more valuable.

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

Completeness1/5

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

Given 5 parameters, nested objects, and no output schema, the description is severely lacking. It omits return values, error conditions, prerequisites, and contextual use cases. Incomplete for effective tool selection.

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%, so baseline is 3. The tool description adds no parameter-specific meaning beyond the schema itself. The schema descriptions are adequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description is 'Update an existing visualization', which merely restates the tool name 'update_visualization'. It adds no new information about the scope or specific action.

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 create_visualization or delete_visualization. The description does not indicate prerequisites or typical use cases.

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