Skip to main content
Glama

get_grid_curl

Generate curl commands and API contracts for BitScale grids to identify required input fields before execution, eliminating trial and error.

Instructions

Get a ready-to-use curl command and structured API contract for running a specific Grid. Call this BEFORE run_grid to discover the exact input fields required by the grid — no trial and error needed.

This endpoint returns the derived required inputs (traced from column dependencies), the full run URL, request body shape, and a copy-paste- ready curl command.

💡 Recommended workflow: 1. Call get_grid_curl to discover the exact input fields. 2. Call run_grid with the returned inputs shape and real values.

Args: grid_id: UUID of the grid. Found in the grid URL at app.bitscale.ai/grid/{gridId}, or from list_grids. output_columns: Optional comma-separated list of column key IDs to include in the run. When provided, required inputs are derived only from the dependencies of the specified columns. When omitted, inputs are derived from all runnable columns in the grid. Example: "col-uuid-1,col-uuid-2"

Returns: grid_id, grid_name, run_url, method, headers, request_body (with mode, inputs shape, and optional output_columns), output_columns array (id, name, type for each requested column), and a curl string ready to copy-paste into a terminal (replace YOUR_WORKSPACE_API_KEY).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grid_idYes
output_columnsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:263-302 (handler)
    The `get_grid_curl` tool is implemented as a decorated function in `main.py`. It uses the `@mcp.tool()` decorator for registration, performs basic validation on `grid_id`, and makes a `_get` request to the Bitscale API to retrieve grid curl information.
    @mcp.tool()
    def get_grid_curl(
        grid_id: str,
        output_columns: str = "",
    ) -> str:
        """
        Get a ready-to-use curl command and structured API contract for running
        a specific Grid. Call this BEFORE run_grid to discover the exact input
        fields required by the grid — no trial and error needed.
    
        This endpoint returns the derived required inputs (traced from column
        dependencies), the full run URL, request body shape, and a copy-paste-
        ready curl command.
    
        💡 Recommended workflow:
            1. Call get_grid_curl to discover the exact input fields.
            2. Call run_grid with the returned inputs shape and real values.
    
        Args:
            grid_id:        UUID of the grid. Found in the grid URL at
                            app.bitscale.ai/grid/{gridId}, or from list_grids.
            output_columns: Optional comma-separated list of column key IDs to
                            include in the run. When provided, required inputs are
                            derived only from the dependencies of the specified
                            columns. When omitted, inputs are derived from all
                            runnable columns in the grid.
                            Example: "col-uuid-1,col-uuid-2"
    
        Returns: grid_id, grid_name, run_url, method, headers, request_body
        (with mode, inputs shape, and optional output_columns), output_columns
        array (id, name, type for each requested column), and a curl string
        ready to copy-paste into a terminal (replace YOUR_WORKSPACE_API_KEY).
        """
        if not grid_id:
            raise ValueError("grid_id must not be empty")
        params: dict = {}
        if output_columns:
            params["output_columns"] = output_columns
        data = _get(f"/grids/{grid_id}/curl", params=params if params else None)
        return json.dumps(data, indent=2)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Clearly explains it derives inputs from column dependencies and returns executable curl command structure. Mentions placeholder for YOUR_WORKSPACE_API_KEY implying auth context. Lacks explicit statement on side effects (read-only nature) though strongly implied by 'Get' and workflow pattern.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with front-loaded purpose, clear Args/Returns sections, and visual workflow marker (💡). Returns section is somewhat verbose given output schema exists (redundant field listing), but appropriate for the tool's complexity and workflow explanation needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a workflow discovery tool: establishes clear relationship to siblings (list_grids as source, run_grid as consumer), explains the dependency tracing mechanism, and documents both input discovery and output format despite existing output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage (only titles), but description fully compensates with rich semantics: grid_id includes location source (URL pattern and list_grids), output_columns explains dependency logic, provides format example 'col-uuid-1,col-uuid-2', and clarifies optional vs required behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent clarity with specific verb 'Get', resource 'curl command and structured API contract', and scope 'for running a specific Grid'. Explicitly distinguishes from sibling 'run_grid' by positioning it as the prerequisite discovery step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Outstanding guidance with explicit 'Call this BEFORE run_grid' and numbered workflow (1. discover inputs, 2. call run_grid). Clearly explains when to use optional output_columns parameter versus omitting it for full grid execution.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/featherflow/bitscale-mcp'

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