Skip to main content
Glama

list_data_sources

Discover available data sources to identify which ones you can query for analytics and business intelligence. Returns unique source IDs with type information for proper SQL syntax usage.

Instructions

List all available data sources. Returns a list of unique source_ids to be used for other queries. Source type is included in the source_id string. While drafting SQL queries use appropriate syntax as per source type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function implementing the list_data_sources tool. It generates a string listing all data sources and their tables using query_utils.list_tables.
    def list_data_sources(self) -> str: """ List all available data sources. Returns a list of unique source_ids to be used for other queries. Source type is included in the source_id string. While drafting SQL queries use appropriate syntax as per source type. """ try: if not self.data_sources: return "No data sources available. Add data sources." result = "Available data sources:\n\n" for source_id in self.data_sources: tables = query_utils.list_tables( self.data_sources[source_id] ) if type(tables) is list: tables = ', '.join(tables) result += f"- {source_id}\nHas tables: {tables}\n" return result except Exception as e: return str(e)
  • The list_data_sources tool is registered in the Core class's tools list within its __init__ method.
    self.tools = [ self.list_data_sources, self.describe_table, self.run_query, ]
  • ZaturnTools class registers tools by including those from core.Core, which contains list_data_sources.
    class ZaturnTools: def __init__(self, data_sources): self.tools = [ *core.Core(data_sources).tools, *visualizations.Visualizations(data_sources).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/kdqed/zaturn'

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