Skip to main content
Glama

KushBitx Preflight

kushbitx_preflight
Read-onlyIdempotent

One check before money moves on Base. Simulates the unsigned transaction, decodes approvals and transfers, screens the token and the recipient or spender, and applies a protected SpendGuard policy when given. Returns ALLOW, REVIEW or BLOCK with sourced findings. Fail-closed: no ALLOW unless every check ran. Does not detect prompt injection; Protected SpendGuard can cap what an agent pays, but does not detect it either. Paid tool: 0.005 USDC per call on Base via x402 (exact scheme). An unpaid call returns the payment requirement and charges nothing. Sign only if verdict is ALLOW, before expiresAt, and the transaction you sign is exactly the one you sent (same transactionDigest, chainId 8453). In code: canSign(report, transaction) from @kushbitx/sdk. Beta: Preflight also accepts batches (up to 10 calls), smart-account calls, ERC-4337 UserOperations (deployed accounts) and EIP-7702 authorizations, at the same price. Any call in a batch that KushBitx does not interpret returns REVIEW. Signed verdicts (Beta): on ALLOW, Preflight returns an EIP-712 signed verdict (60-second expiry) bound to executionDigest; REVIEW and BLOCK are never signed; keys at /.well-known/kushbitx-preflight-signers.json.

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": {
      "chainId": "<chainId>"
    },
    "name": "kushbitx_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTransaction destination (contract or wallet).
dataNoUnsigned calldata.
fromNoWallet that will sign. Required in practice: without it the verdict is REVIEW (sender_unknown), because the transaction cannot be simulated from the signing wallet.
callsNoBeta. A batch of 1 to 10 calls from one account (from required; no to). Each call: to, value, data, and optionally intent, tokenAddress, expectedRecipient, minAmountOut, expectedTokenOut. Any call KushBitx does not interpret makes the batch REVIEW.
valueNoNative ETH value in wei.
amountNoAmount in token units, for the record.
intentNoWhat the agent means to do.
policyNoProtected SpendGuard policy (send the agent key as Authorization: Bearer). Base USDC transfers only.
chainIdYesBase mainnet.
entryPointNoBeta. With userOperation: the official EntryPoint v0.6, v0.7 or v0.8 address.
minAmountOutNoSwap: smallest acceptable output, in token units (for example 25.5).
tokenAddressNoToken to screen, when it is not the transaction destination (for example the token being bought).
userOperationNoBeta. An ERC-4337 UserOperation for a deployed account, with entryPoint (no to).
safeTransactionNoBeta. A Safe transaction (instead of to and data). On ALLOW the response carries safeCoSignature (Safe Policy Engine CoSignerPolicy format); a delegatecall is never co-signed.
expectedTokenOutNoSwap: token the swap must deliver; 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH. For buy_token, tokenAddress is used when this is absent.
authorizationListNoBeta. EIP-7702 authorizations {chainId, address, nonce, yParity, r, s} of a type-4 transaction.
expectedRecipientNoSwap: who must receive the output (default: from). ETH or ERC-20 transfer: who must be paid; a different recipient is BLOCK (EXPECTED_RECIPIENT_MISMATCH).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / authorizationList / items / properties
      Added value: +{
      +  "address": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "authority": {
      +    "description": "Optional: the signer of the authorization, when known.",
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "chainId": {
      +    "type": "integer"
      +  },
      +  "nonce": {
      +    "type": [
      +      "string",
      +      "integer"
      +    ]
      +  },
      +  "r": {
      +    "type": "string"
      +  },
      +  "s": {
      +    "type": "string"
      +  },
      +  "yParity": {
      +    "type": [
      +      "string",
      +      "integer"
      +    ]
      +  }
      +}
    • addedInput schema / properties / authorizationList / items / required
      Added value: +[
      +  "chainId",
      +  "address"
      +]
    • addedInput schema / properties / calls / items / properties
      Added value: +{
      +  "data": {
      +    "pattern": "^0x([a-fA-F0-9]{2})*$",
      +    "type": "string"
      +  },
      +  "expectedRecipient": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "expectedTokenOut": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "intent": {
      +    "enum": [
      +      "swap",
      +      "transfer",
      +      "approve",
      +      "buy_token",
      +      "contract_call"
      +    ],
      +    "type": "string"
      +  },
      +  "minAmountOut": {
      +    "type": "string"
      +  },
      +  "to": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "tokenAddress": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "value": {
      +    "pattern": "^[0-9]+$",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / calls / items / required
      Added value: +[
      +  "to"
      +]
    • addedInput schema / properties / userOperation / properties
      Added value: +{
      +  "callData": {
      +    "pattern": "^0x([a-fA-F0-9]{2})*$",
      +    "type": "string"
      +  },
      +  "callGasLimit": {
      +    "type": "string"
      +  },
      +  "factory": {
      +    "type": "string"
      +  },
      +  "factoryData": {
      +    "type": "string"
      +  },
      +  "initCode": {
      +    "type": "string"
      +  },
      +  "maxFeePerGas": {
      +    "type": "string"
      +  },
      +  "maxPriorityFeePerGas": {
      +    "type": "string"
      +  },
      +  "nonce": {
      +    "type": "string"
      +  },
      +  "paymaster": {
      +    "type": "string"
      +  },
      +  "paymasterAndData": {
      +    "type": "string"
      +  },
      +  "paymasterData": {
      +    "type": "string"
      +  },
      +  "preVerificationGas": {
      +    "type": "string"
      +  },
      +  "sender": {
      +    "pattern": "^0x[a-fA-F0-9]{40}$",
      +    "type": "string"
      +  },
      +  "signature": {
      +    "type": "string"
      +  },
      +  "verificationGasLimit": {
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / userOperation / required
      Added value: +[
      +  "sender",
      +  "callData"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / safeTransaction
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Beta. A Safe transaction (instead of to and data). On ALLOW the response carries safeCoSignature (Safe Policy Engine CoSignerPolicy format); a delegatecall is never co-signed.",
      +  "properties": {
      +    "data": {
      +      "type": "string"
      +    },
      +    "nonce": {
      +      "type": "string"
      +    },
      +    "operation": {
      +      "enum": [
      +        0,
      +        1
      +      ],
      +      "type": "integer"
      +    },
      +    "safe": {
      +      "type": "string"
      +    },
      +    "to": {
      +      "type": "string"
      +    },
      +    "value": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "safe",
      +    "to"
      +  ],
      +  "type": "object"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / authorizationList
      Added value: +{
      +  "description": "Beta. EIP-7702 authorizations {chainId, address, nonce, yParity, r, s} of a type-4 transaction.",
      +  "items": {
      +    "type": "object"
      +  },
      +  "maxItems": 5,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / calls
      Added value: +{
      +  "description": "Beta. A batch of 1 to 10 calls from one account (from required; no to). Each call: to, value, data, and optionally intent, tokenAddress, expectedRecipient, minAmountOut, expectedTokenOut. Any call KushBitx does not interpret makes the batch REVIEW.",
      +  "items": {
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / entryPoint
      Added value: +{
      +  "description": "Beta. With userOperation: the official EntryPoint v0.6, v0.7 or v0.8 address.",
      +  "pattern": "^0x[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / userOperation
      Added value: +{
      +  "description": "Beta. An ERC-4337 UserOperation for a deployed account, with entryPoint (no to).",
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "chainId",
      -  "to"
      -]New value: +[
      +  "chainId"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / expectedRecipient / description
      Previous value: -"Swap: who must receive the output. Default: from."New value: +"Swap: who must receive the output (default: from). ETH or ERC-20 transfer: who must be paid; a different recipient is BLOCK (EXPECTED_RECIPIENT_MISMATCH)."
  5. Changed4 schema fields changed
    • addedInput schema / properties / expectedRecipient
      Added value: +{
      +  "description": "Swap: who must receive the output. Default: from.",
      +  "pattern": "^0x[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / expectedTokenOut
      Added value: +{
      +  "description": "Swap: token the swap must deliver; 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH. For buy_token, tokenAddress is used when this is absent.",
      +  "pattern": "^0x[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / from / description
      Previous value: -"Wallet that will sign; used for simulation."New value: +"Wallet that will sign. Required in practice: without it the verdict is REVIEW (sender_unknown), because the transaction cannot be simulated from the signing wallet."
    • addedInput schema / properties / minAmountOut
      Added value: +{
      +  "description": "Swap: smallest acceptable output, in token units (for example 25.5).",
      +  "pattern": "^[0-9]+(\\.[0-9]{1,36})?$",
      +  "type": "string"
      +}
  6. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/non-destructive; the description adds the material behavior an agent cannot infer: fail-closed semantics (no ALLOW unless every check ran), the 0.005 USDC x402 charge and that an unpaid call returns the payment requirement and charges nothing, the 60-second signed-verdict expiry bound to executionDigest, and the explicit non-coverage of prompt injection. These are exactly the operational facts that drive correct invocation and outcome handling.

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?

Front-loaded with the one-line purpose, then verdict semantics, then payment, then the signing rule, then Beta scope — a sensible order. It is dense and parenthetical-heavy, and the prompt-injection sentence repeats itself ("does not detect it either"), but nearly every sentence carries decision-relevant information.

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 17-parameter, nested-object, no-output-schema tool, the description covers the return contract (ALLOW/REVIEW/BLOCK plus sourced findings, signed verdict fields, safeCoSignature) and the critical payment/auth model. What is thin is per-mode guidance for the Beta paths (batches, UserOperations, EIP-7702, Safe), which an agent must reconstruct entirely from the schema.

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?

Schema coverage is 100% with 17 parameters, so the baseline is 3; the description still adds meaning by framing policy as a protected SpendGuard cap, noting the Bearer key requirement, explaining that batch members KushBitx cannot interpret yield REVIEW, and tying the signed transaction to transactionDigest and chainId 8453. It does not walk through the ERC-4337/7702/Safe parameter families, which remain schema-only.

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 states a concrete verb chain (simulates, decodes, screens, applies policy, returns ALLOW/REVIEW/BLOCK) on a concrete resource (an unsigned Base transaction). An agent immediately knows this is a pre-signing risk gate rather than a scanner or payment verifier. It does not name a sibling to differentiate from, but the operation itself is unambiguous.

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?

Usage timing is stated crisply: "One check before money moves on Base" and "Sign only if verdict is ALLOW, before expiresAt, and the transaction you sign is exactly the one you sent." That is a clear call condition plus a downstream decision rule. It stops short of naming alternatives (e.g., when a lighter quick_check would suffice) or when not to call it, so it is not a 5.

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.

Resources