Skip to main content
Glama

list_data_sources

Retrieve all configured data sources available in Redash for query execution and data analysis.

Instructions

List all available data sources in Redash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full implementation of the list_data_sources tool handler, which takes no arguments, calls RedashClient.listDataSources(), stringifies the result as JSON, and 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, }; } }, };
  • Input schema for list_data_sources tool: empty object (no parameters required).
    inputSchema: { type: 'object', properties: {}, additionalProperties: false, },
  • src/index.ts:59-59 (registration)
    Registration of listDataSourcesTool in the tools array used by MCP server handlers.
    const tools = [listDataSourcesTool, getDataSourceTool, executeQueryAndWaitTool, listQueriesTool];
  • src/index.ts:16-16 (registration)
    Import of listDataSourcesTool for registration.
    import { listDataSourcesTool, getDataSourceTool } from './tools/datasource.js';
  • Helper method on RedashClient used by the tool handler to fetch data sources via API.
    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