Skip to main content
Glama

ChainGuard Web3 Security & DeFi MCP

build_cross_chain_consolidation

Read-onlyIdempotent

Build unsigned non-custodial CROSS-CHAIN bridge and swap calldata via LI.FI Diamond moving an ERC-20 or native token from from_network to a DIFFERENT destination to_network (settling in USDC, USDT, or destination NATIVE gas across base, arbitrum, optimism, polygon, ethereum, bsc, linea, avalanche). Read-only calldata builder: does not sign or broadcast transactions (unlimited free calls; includes a 1.00% atomic integrator fee). Returns JSON with from_network, to_network, approve_tx, bridge_tx, estimated_out_usd, and execution_duration_sec. Use this tool only when bridging across two DIFFERENT networks; use build_evm_dust_to_usdt_sweep for same-chain swaps.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from_network": "<from_network>",
      "token_in": "<token_in>",
      "amount_in_raw": "<amount_in_raw>",
      "sender": "<sender>"
    },
    "name": "build_cross_chain_consolidation"
  }
}

Input Schema

NameRequiredDescriptionDefault
senderYes42-character hexadecimal EVM wallet address (`0x...`) initiating the bridge on `from_network` and receiving funds on `to_network`.
token_inYes42-character hexadecimal ERC-20 token contract address (`0x...`) on `from_network` (or `0x0000000000000000000000000000000000000000` for native gas).
to_networkNoDestination EVM chain to receive the bridged stablecoin or native gas. Defaults to `base`.base
from_networkYesSource EVM chain where the token currently resides (must differ from `to_network`).
amount_in_rawYesInput token amount in atomic base units (wei integer formatted as a decimal string, e.g. `10000000` for 10 USDC).
target_stableNoOutput asset on `to_network`: `USDC`, `USDT`, or `NATIVE` (for emergency cross-chain gas refuel). Defaults to `USDC`.USDC

Output Schema

NameRequiredDescriptionDefault
providerYes
to_networkYes
from_networkYes
estimated_out_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / amount_in_raw / description
      Added value: +"Input token amount in atomic base units (wei integer formatted as a decimal string, e.g. `10000000` for 10 USDC)."
    • addedInput schema / properties / from_network / description
      Added value: +"Source EVM chain where the token currently resides (must differ from `to_network`)."
    • addedInput schema / properties / from_network / enum
      Added value: +[
      +  "base",
      +  "arbitrum",
      +  "optimism",
      +  "polygon",
      +  "ethereum",
      +  "bsc",
      +  "linea",
      +  "avalanche"
      +]
    • addedInput schema / properties / sender / description
      Added value: +"42-character hexadecimal EVM wallet address (`0x...`) initiating the bridge on `from_network` and receiving funds on `to_network`."
    • addedInput schema / properties / target_stable / description
      Added value: +"Output asset on `to_network`: `USDC`, `USDT`, or `NATIVE` (for emergency cross-chain gas refuel). Defaults to `USDC`."
    • addedInput schema / properties / target_stable / enum
      Added value: +[
      +  "USDC",
      +  "USDT",
      +  "NATIVE"
      +]
    • addedInput schema / properties / to_network / description
      Added value: +"Destination EVM chain to receive the bridged stablecoin or native gas. Defaults to `base`."
    • addedInput schema / properties / to_network / enum
      Added value: +[
      +  "base",
      +  "arbitrum",
      +  "optimism",
      +  "polygon",
      +  "ethereum",
      +  "bsc",
      +  "linea",
      +  "avalanche"
      +]
    • addedInput schema / properties / token_in / description
      Added value: +"42-character hexadecimal ERC-20 token contract address (`0x...`) on `from_network` (or `0x0000000000000000000000000000000000000000` for native gas)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "estimated_out_usd": {
      +      "type": "number"
      +    },
      +    "from_network": {
      +      "type": "string"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "to_network": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "from_network",
      +    "to_network",
      +    "provider"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), yet the description adds material facts not in annotations: it is non-custodial, does not sign or broadcast, has unlimited free calls, and charges a 1.00% atomic integrator fee. Fee and rate-limit disclosure is exactly the kind of behavioral context an agent needs before constructing a transaction.

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?

Content is front-loaded with the core action, then the read-only/fee caveats and return fields. The single dense paragraph is efficient, though the parenthetical enumerating all eight networks and the settlement list make it heavier than necessary for a description.

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 6-parameter bridge builder with an output schema and rich annotations, the description covers scope, exclusions, fees, and safety. It stops short of explaining how the returned approve_tx and bridge_tx relate (ordering/approval prerequisite), which would help an agent act on the result.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented including the zero-address native-token convention and atomic-unit formatting. The description reinforces the cross-chain directionality and settlement semantics but adds little syntax or meaning the schema does not already supply; baseline 3 applies.

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?

States a specific verb and resource ('Build unsigned non-custodial CROSS-CHAIN bridge and swap calldata via LI.FI Diamond') plus the exact directionality constraint (from_network to a DIFFERENT to_network). It explicitly contrasts with the sibling build_evm_dust_to_usdt_sweep for same-chain swaps, so an agent can pick the right tool without opening either schema.

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?

Gives an explicit positive condition ('only when bridging across two DIFFERENT networks') and names the alternative for the excluded case ('use build_evm_dust_to_usdt_sweep for same-chain swaps'). The settlement options (USDC, USDT, or destination NATIVE gas) further scope when this tool is appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.