Skip to main content
Glama
suthio

Redash MCP Server

by suthio

list_data_sources

Retrieve a list of all available data sources in Redash to review connections and access settings.

Instructions

List all available data sources in Redash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_data_sources' tool. Calls redashClient.getDataSources() and returns the data sources list as JSON. Has no input parameters (no schema required).
    // Tool: list_data_sources
    async function listDataSources() {
      try {
        const dataSources = await redashClient.getDataSources();
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(dataSources, null, 2)
            }
          ]
        };
      } catch (error) {
        logger.error(`Error listing data sources: ${error}`);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error listing data sources: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • src/index.ts:1676-1683 (registration)
    Registration of 'list_data_sources' in the ListToolsRequestSchema handler, defining its name, description, and empty input schema (no parameters).
    {
      name: "list_data_sources",
      description: "List all available data sources in Redash",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • src/index.ts:2352-2355 (registration)
    Route registration in the CallToolRequestSchema switch statement: case 'list_data_sources' dispatches to listDataSources() handler.
    case "list_data_sources":
      logger.debug(`Handling list_data_sources`);
      return await listDataSources();
  • The getDataSources() helper method on RedashClient that makes the actual HTTP GET request to /api/data_sources to fetch data sources from Redash.
    // List available data sources
    async getDataSources(): Promise<any[]> {
      try {
        const response = await this.client.get('/api/data_sources');
        return response.data;
      } catch (error) {
        logger.error(`Error fetching data sources: ${error}`);
        throw new Error('Failed to fetch data sources from Redash');
      }
    }
Behavior4/5

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

The description implies a read-only operation by using 'List', which aligns with the typical behavior. No annotations exist, so the statement is clear and accurate, though it could mention safety (e.g., no side effects).

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?

A single, direct sentence with no extraneous words. It efficiently conveys the purpose without redundancy.

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

Completeness5/5

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

Given zero parameters, no output schema, and a straightforward operation, the description fully covers what an agent needs to know to use this tool correctly.

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

Parameters4/5

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

No parameters are defined, so the description adds no parameter-level details. This is acceptable as there is nothing to clarify, achieving the baseline score.

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 ('List') and the resource ('all available data sources in Redash'), distinguishing it from sibling list tools like 'list_alerts' or 'list_dashboards'.

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

Usage Guidelines4/5

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

While no explicit when-to-use or alternatives are provided, the description is self-explanatory. For a simple listing tool, this is sufficient, though context about prerequisites could be added.

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