Skip to main content
Glama

ChainGuard Web3 Security & DeFi MCP

check_tx_firewall

Read-onlyIdempotent

Perform a read-only pre-flight security check on an unsigned EVM transaction (to, calldata, network) before signing or broadcasting. Screens 4-byte function selectors against unlimited ERC-20 approve(MAX_UINT256) (0x095ea7b3), NFT setApprovalForAll(true) (0xa22cb465), Permit2 drainer signatures (0xd505accf), UUPS proxy upgrades (0x3659cfe6), and verifies whether the spender is an unverified EOA via eth_getCode. Does not broadcast any transaction. Returns JSON with verdict (ALLOW, WARN, BLOCK), risk_score (0-100), decoded selector, and actionable alerts.

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": {
      "to": "<to>"
    },
    "name": "check_tx_firewall"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes42-character hexadecimal target contract or recipient address (`0x...`) of the unsigned EVM transaction.
networkNoEVM network identifier where the transaction will be executed (`base`, `arbitrum`, `polygon`, `ethereum`, `optimism`, `bsc`). Defaults to `base`.base
calldataNoHex-encoded transaction input data starting with `0x` (e.g. `0x095ea7b3...`). Pass `0x` for native value transfers.0x

Output Schema

NameRequiredDescriptionDefault
alertsNo
verdictYes
risk_scoreYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / calldata / description
      Added value: +"Hex-encoded transaction input data starting with `0x` (e.g. `0x095ea7b3...`). Pass `0x` for native value transfers."
    • addedInput schema / properties / network / description
      Added value: +"EVM network identifier where the transaction will be executed (`base`, `arbitrum`, `polygon`, `ethereum`, `optimism`, `bsc`). Defaults to `base`."
    • addedInput schema / properties / network / enum
      Added value: +[
      +  "base",
      +  "arbitrum",
      +  "polygon",
      +  "ethereum",
      +  "optimism",
      +  "bsc"
      +]
    • addedInput schema / properties / to / description
      Added value: +"42-character hexadecimal target contract or recipient address (`0x...`) of the unsigned EVM transaction."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "alerts": {
      +      "type": "array"
      +    },
      +    "risk_score": {
      +      "type": "integer"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "verdict",
      +    "risk_score"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, so safety framing is largely covered; the description goes further by disclosing the actual detection method (selector matching against five known-dangerous signatures and an eth_getCode call to classify the spender) and the three-tier verdict semantics. It stops short of stating rate limits, failure behavior on an unindexed network, or what happens when calldata is empty, which keeps it off a 5.

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?

Three sentences, front-loaded with the purpose before the mechanics and the return shape. The selector list is dense but each entry is load-bearing; only the closing return-value sentence is partly redundant with the output schema.

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?

For a three-parameter, fully documented, output-schema-backed tool, the description covers purpose, timing, detection scope, and non-side-effecting behavior. An agent has everything needed to decide to call it and to interpret the verdict without further documentation.

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 coverage is 100%, with all three parameters fully described including the enum and default, so the baseline is 3. The description reinforces which fields are consumed by the scan (to, calldata, network) but adds no format or constraint detail beyond what the schema already 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?

States a specific verb and resource ('read-only pre-flight security check on an unsigned EVM transaction') and enumerates exactly what is screened: four named selectors with their hex values plus an eth_getCode spender check. This is clearly distinguishable from the build_* siblings that construct transactions rather than inspect them.

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

Usage Guidelines4/5

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

The temporal guidance is explicit and useful: run this 'before signing or broadcasting', which tells the agent where in the workflow it belongs. It also rules out one class of misuse ('Does not broadcast any transaction'), but it does not name a sibling alternative for cases where the agent wants remediation rather than a verdict.

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.