dune_describe_table
Retrieve column details for any Dune Analytics table to understand data structure and prepare queries. Specify schema and table names to get comprehensive metadata.
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:603-612 (handler)The MCP tool handler function for dune_describe_table, which calls the implementation and handles errors.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:579-594 (helper)Core implementation logic that uses DISCOVERY_SERVICE to describe the table and formats the columns.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)Registration of the dune_describe_table tool using @app.tool decorator, including metadata like 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:597-602 (schema)Tool schema defined by decorator parameters and function signature: inputs schema:str, table:str; output dict[str, Any].@app.tool( name="dune_describe_table", title="Describe Table", description="Describe columns for a schema.table on Dune.", tags={"dune", "schema"}, )