dune_describe_table
Retrieve column details for any Dune Analytics table to understand data structure and schema organization before querying blockchain datasets.
Instructions
Describe columns for a schema.table on Dune.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | ||
| table | Yes |
Implementation Reference
- src/spice_mcp/mcp/server.py:579-595 (handler)Core handler logic: uses DiscoveryService to describe table columns and formats output with column details.def _dune_describe_table_impl(schema: str, table: str) -> dict[str, Any]: _ensure_initialized() assert DISCOVERY_SERVICE is not None desc = DISCOVERY_SERVICE.describe_table(schema, table) cols = [] for col in desc.columns: cols.append( { "name": col.name, "dune_type": col.dune_type, "polars_dtype": col.polars_dtype, "extra": col.extra, "comment": col.comment, } ) return {"columns": cols, "table": desc.fully_qualified_name}
- src/spice_mcp/mcp/server.py:597-602 (registration)Registers the dune_describe_table tool with FastMCP app, defining name, title, description, and tags.@app.tool( name="dune_describe_table", title="Describe Table", description="Describe columns for a schema.table on Dune.", tags={"dune", "schema"}, )
- src/spice_mcp/mcp/server.py:603-612 (handler)Public handler function: thin wrapper around _dune_describe_table_impl with error handling.def dune_describe_table(schema: str, table: str) -> dict[str, Any]: try: return _dune_describe_table_impl(schema=schema, table=table) except Exception as e: return error_response(e, context={ "tool": "dune_describe_table", "schema": schema, "table": table, })
- src/spice_mcp/mcp/server.py:603-612 (schema)Input schema defined by function parameters: schema (str), table (str). Output: dict with columns list and table name.def dune_describe_table(schema: str, table: str) -> dict[str, Any]: try: return _dune_describe_table_impl(schema=schema, table=table) except Exception as e: return error_response(e, context={ "tool": "dune_describe_table", "schema": schema, "table": table, })