Skip to main content
Glama
knishioka

Treasure Data MCP Server

by knishioka

td_list_databases

Retrieve a list of accessible databases to discover available data sources and verify permissions. Use verbose mode for detailed information or pagination for large datasets.

Instructions

List available databases to find data sources and check access.

Shows all databases you can access. Returns just names for quick overview, or set verbose=True for details like table count and permissions. Common scenarios: - Discover what databases are available in your account - Check permissions on specific databases - Get database list for documentation or auditing Use pagination (limit/offset) for large lists or all_results=True for everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
all_resultsNo
limitNo
offsetNo
verboseNo

Implementation Reference

  • The primary handler function for the 'td_list_databases' MCP tool. Decorated with @mcp.tool() for automatic registration. Lists Treasure Data databases using the API client, supporting verbose output, pagination (limit/offset), and all_results flag. Handles errors gracefully.
    @mcp.tool() async def td_list_databases( verbose: bool = False, limit: int = DEFAULT_LIMIT, offset: int = 0, all_results: bool = False, ) -> dict[str, Any]: """List available databases to find data sources and check access. Shows all databases you can access. Returns just names for quick overview, or set verbose=True for details like table count and permissions. Common scenarios: - Discover what databases are available in your account - Check permissions on specific databases - Get database list for documentation or auditing Use pagination (limit/offset) for large lists or all_results=True for everything. """ client = _create_client() if isinstance(client, dict): return client try: databases = client.get_databases( limit=limit, offset=offset, all_results=all_results ) if verbose: # Return full database details return {"databases": [db.model_dump() for db in databases]} else: # Return only database names return {"databases": [db.name for db in databases]} except (ValueError, requests.RequestException) as e: return _format_error_response(f"Failed to retrieve databases: {str(e)}") except Exception as e: return _format_error_response( f"Unexpected error while retrieving databases: {str(e)}" )
  • The @mcp.tool() decorator registers the td_list_databases function as an MCP tool with the FastMCP server instance 'mcp'.
    @mcp.tool()
  • Function signature defines the input schema (parameters with types and defaults) and output type for the tool.
    async def td_list_databases( verbose: bool = False, limit: int = DEFAULT_LIMIT, offset: int = 0, all_results: bool = False, ) -> dict[str, Any]:

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/knishioka/td-mcp-server'

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