get_grid_details
Retrieve comprehensive metadata for a specific grid, including column definitions, settings, and data sources. Use this to understand grid schemas before execution, identifying input labels and output column UUIDs required for running grids.
Instructions
Get full metadata for a specific Grid, including all column definitions, grid settings, and attached data sources.
Use this to inspect a grid's schema before running it — especially to understand the grid's input labels and output column UUIDs needed for the run_grid tool.
Args: grid_id: UUID of the grid. Found in the grid URL at app.bitscale.ai/grid/{gridId}, or from list_grids results.
Returns: grid id, name, description, row_count, created_at, updated_at, settings (auto_run, auto_dedupe, visibility, dedupe_column_id), columns (all columns including text, enrichment, formula, merge types with their id/key and name), and sources (data sources with schedule info).
NOTE on columns vs run_grid inputs:
The column 'id' values here are UUIDs — use these for the 'output_columns' parameter of run_grid to filter which outputs you want.
The 'inputs' parameter of run_grid uses human-readable LABELS (e.g. "company_name", "website"), NOT column UUIDs. These labels are derived from the API data source columns configured on the grid. You can find the exact input labels in the BitScale app under the grid's Data Source → BitScale API panel, or by inspecting the source column names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- main.py:124-156 (handler)The get_grid_details function is the handler that fetches grid metadata by querying the /grids/{grid_id} endpoint. It is decorated as an MCP tool (though the decorator is not visible in the snippet provided in lines 124-156, it is implied by the surrounding code pattern and the request context). Note: The code provided for lines 124-156 is the core implementation.
def get_grid_details(grid_id: str) -> str: """ Get full metadata for a specific Grid, including all column definitions, grid settings, and attached data sources. Use this to inspect a grid's schema before running it — especially to understand the grid's input labels and output column UUIDs needed for the run_grid tool. Args: grid_id: UUID of the grid. Found in the grid URL at app.bitscale.ai/grid/{gridId}, or from list_grids results. Returns: grid id, name, description, row_count, created_at, updated_at, settings (auto_run, auto_dedupe, visibility, dedupe_column_id), columns (all columns including text, enrichment, formula, merge types with their id/key and name), and sources (data sources with schedule info). NOTE on columns vs run_grid inputs: - The column 'id' values here are UUIDs — use these for the 'output_columns' parameter of run_grid to filter which outputs you want. - The 'inputs' parameter of run_grid uses human-readable LABELS (e.g. "company_name", "website"), NOT column UUIDs. These labels are derived from the API data source columns configured on the grid. You can find the exact input labels in the BitScale app under the grid's Data Source → BitScale API panel, or by inspecting the source column names. """ if not grid_id: raise ValueError("grid_id must not be empty") data = _get(f"/grids/{grid_id}") return json.dumps(data, indent=2)