Skip to main content
Glama

list_data_sources

View all connected data sources in your Redash instance to identify available databases and datasets for querying.

Instructions

List all available data sources in Redash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Defines the 'list_data_sources' tool including its input schema (empty object), description, and handler function. The handler calls RedashClient.listDataSources(), stringifies the result as JSON, and returns it as text content, or handles errors.
    export const listDataSourcesTool: Tool = { name: 'list_data_sources', description: 'List all available data sources in Redash', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, handler: async (_args, client) => { try { const dataSources = await client.listDataSources(); return { content: [ { type: 'text', text: JSON.stringify(dataSources, null, 2), } as TextContent, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error listing data sources: ${error instanceof Error ? error.message : String(error)}`, } as TextContent, ], isError: true, }; } }, };
  • src/index.ts:59-59 (registration)
    Registers the listDataSourcesTool by including it in the tools array used by the MCP server's list_tools and call_tool request handlers.
    const tools = [listDataSourcesTool, getDataSourceTool, executeQueryAndWaitTool, listQueriesTool];
  • Helper method in RedashClient that performs the API request to fetch the list of data sources from '/api/data_sources', invoked by the tool handler.
    async listDataSources(): Promise<DataSource[]> { return this.request<DataSource[]>('/api/data_sources'); }

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/jasonsmithj/redash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server