Skip to main content
Glama
kukapay

blocknative-mcp

get_supported_chains

Retrieve a formatted list of blockchain networks supported by the Blocknative Gas Platform, including chain ID, system, and network details.

Instructions

List the blockchain networks supported by the Blocknative Gas Platform, formatted as a Markdown table.

Parameters:
- ctx (Optional[Context]): The MCP context object. Default: None.

Returns:
- A Markdown table listing supported chains with their chain ID, system, and network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctxNo

Implementation Reference

  • The handler function for the 'get_supported_chains' MCP tool, including the @mcp.tool() decorator for registration. It calls the fetch_supported_chains helper and formats the response as a Markdown table listing supported blockchain networks.
    @mcp.tool()
    async def get_supported_chains(ctx: Optional[Context] = None) -> str:
        """
        List the blockchain networks supported by the Blocknative Gas Platform, formatted as a Markdown table.
    
        Parameters:
        - ctx (Optional[Context]): The MCP context object. Default: None.
    
        Returns:
        - A Markdown table listing supported chains with their chain ID, system, and network.
        """
        data = await fetch_supported_chains()
        if data["error"]:
            return data["error"]
        
        chains = data["chains"]
        if not chains:
            return "No supported chains found."
        
        output = "Supported Chains:\n\n"
        output += "| Chain ID | System | Network |\n"
        output += "|----------|--------|---------|\n"
        for chain in chains:
            chain_id = chain.get("chainId", "Unknown")
            system = chain.get("system", "Unknown")
            network = chain.get("network", "Unknown")
            output += f"| {chain_id} | {system} | {network} |\n"
        
        return output
  • Helper utility function that fetches the list of supported chains from the Blocknative API endpoint.
    # Helper function to fetch supported chains from Blocknative
    async def fetch_supported_chains() -> Dict:
        """Fetch the list of supported chains from Blocknative Chains API."""
        try:
            headers = {"Authorization": BLOCKNATIVE_API_KEY} if BLOCKNATIVE_API_KEY else {}
            async with httpx.AsyncClient() as client:
                response = await client.get(BLOCKNATIVE_CHAINS_API_URL, headers=headers)
                response.raise_for_status()
                data = response.json()
            return {"chains": data, "error": None}
        except httpx.HTTPError as e:
            return {"chains": [], "error": f"Failed to fetch supported chains: {str(e)}"}
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the output format (Markdown table) and the data included (chain ID, system, network), which is helpful. However, it doesn't mention whether this is a read-only operation, if there are rate limits, authentication requirements, or potential side effects, which are important for a tool with no annotations.

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?

The description is appropriately sized with three sentences that each serve a distinct purpose: stating the tool's purpose, documenting parameters, and specifying the return format. It's front-loaded with the core functionality and avoids unnecessary verbosity.

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

Completeness4/5

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

For a simple read-only listing tool with one optional parameter and no output schema, the description provides adequate context. It explains what the tool does, documents the parameter, and specifies the return format. While it could benefit from more behavioral details (given no annotations), it covers the essential information needed to use the tool correctly.

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

Parameters4/5

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

The description explicitly documents the single parameter 'ctx' as optional with a default value, and provides a clear explanation of its purpose as the MCP context object. With 0% schema description coverage, the description fully compensates by adding meaningful semantics beyond what the bare schema provides.

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?

The description clearly states the specific action ('List'), resource ('blockchain networks supported by the Blocknative Gas Platform'), and output format ('formatted as a Markdown table'). It distinguishes itself from sibling tools like 'estimate_gas_cost' and 'predict_gas_price' by focusing on listing supported chains rather than gas-related operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, dependencies, or scenarios where this tool is preferred over others, leaving the agent to infer usage from the purpose alone.

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/kukapay/blocknative-mcp'

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