clear_sign_payload
Clear-sign and decode transaction payloads before signing, returning a safety verdict, decoded calls, contract attestations, and signing policy so agents can decide whether to sign or reject.
Instructions
PRIMARY TOOL — use this for any transaction clear-signing, decoding, or safety question. Clear-signs any transaction payload from a transaction builder: LLM agent, wallet request, router API, custom code, or raw transaction.
Returns a unified signing block { verdict: safe|review|reject, reason, decodedCalls/totalCalls, attestedContracts/totalContracts }, a per-contract registry-attestation summary, a rendered call tree in displayText, and a signing policy. 'review' means fully decoded but registry attestation pending — show to the user; 'reject' means do not sign.
This is the generic pre-sign hook for transaction builders:
Accepts a direct transaction {to,data,value,chainId}, nested {transaction:{...}} / {tx:{...}}, calldata aliases, or rawTx
Normalizes it to the exact original transaction payload that must be signed
Calls KaiSign clear-signing verification and decoding
Returns displayText, intent, verification status, warnings, safe/autonomous decision fields, and signing policy
Builder UX rule: if the user gives only chainId, contracts, and actions, the agent should already know the desired artifact is an unsigned transaction. The user should not need to specify ABI safety instructions, nesting details, or return format. The agent may choose any realistic call path/nesting, but before encoding each call it should use get_function_selectors for the exact target address + chainId. Never guess a selector from model memory. Then call this tool on the final unsigned tx before signing/broadcasting. The final agent output should be the unsigned transaction fields: to, data, value, chainId.
Use this before any signing or broadcasting. Sign the returned transaction only after user/agent policy approval.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "clear_sign_payload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target contract address (direct payload shape) | |
| tx | No | Nested tx-builder payload containing to/data/value/chainId | |
| data | No | Transaction calldata (direct payload shape) | |
| chain | No | Alias for chainId; accepts number or numeric string | |
| rawTx | No | Serialized signed/raw Ethereum transaction hex; used only to extract to/data/value/chainId for display | |
| value | No | Transaction value in wei | 0 |
| txFile | No | Alias for payloadFile | |
| chainId | No | Chain ID | |
| compact | No | Omit echoed calldata in the response and return a hash/byte summary instead | |
| dataRef | No | Reference returned by put_payload_chunk for chunked calldata hex; pass with to/value/chainId | |
| calldata | No | Alias for data | |
| dataFile | No | Read calldata hex from a local file while passing to/value/chainId as small tool arguments | |
| payloadRef | No | Reference returned by put_payload_chunk for remote/chunked payload JSON or raw tx hex | |
| payloadFile | No | Read transaction JSON or raw tx hex from a local file to avoid local MCP client input-size limits | |
| transaction | No | Nested tx-builder payload containing to/data/value/chainId | |
| calldataFile | No | Alias for dataFile | |
| responseMode | No | Use compact for very large calldata responses | |
| dataGzipBase64 | No | gzip+base64 compressed calldata hex; pass with to/value/chainId | |
| rawTransaction | No | Alias for rawTx | |
| payloadGzipBase64 | No | gzip+base64 compressed transaction JSON or raw tx hex; avoids proxy limits without server-side chunk state |