Skip to main content
Glama
KaiSign MCP Server

KaiSign MCP Server

Official
by Kai-Sign

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:

  1. Accepts a direct transaction {to,data,value,chainId}, nested {transaction:{...}} / {tx:{...}}, calldata aliases, or rawTx

  2. Normalizes it to the exact original transaction payload that must be signed

  3. Calls KaiSign clear-signing verification and decoding

  4. 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

NameRequiredDescriptionDefault
toNoTarget contract address (direct payload shape)
txNoNested tx-builder payload containing to/data/value/chainId
dataNoTransaction calldata (direct payload shape)
chainNoAlias for chainId; accepts number or numeric string
rawTxNoSerialized signed/raw Ethereum transaction hex; used only to extract to/data/value/chainId for display
valueNoTransaction value in wei0
txFileNoAlias for payloadFile
chainIdNoChain ID
compactNoOmit echoed calldata in the response and return a hash/byte summary instead
dataRefNoReference returned by put_payload_chunk for chunked calldata hex; pass with to/value/chainId
calldataNoAlias for data
dataFileNoRead calldata hex from a local file while passing to/value/chainId as small tool arguments
payloadRefNoReference returned by put_payload_chunk for remote/chunked payload JSON or raw tx hex
payloadFileNoRead transaction JSON or raw tx hex from a local file to avoid local MCP client input-size limits
transactionNoNested tx-builder payload containing to/data/value/chainId
calldataFileNoAlias for dataFile
responseModeNoUse compact for very large calldata responses
dataGzipBase64Nogzip+base64 compressed calldata hex; pass with to/value/chainId
rawTransactionNoAlias for rawTx
payloadGzipBase64Nogzip+base64 compressed transaction JSON or raw tx hex; avoids proxy limits without server-side chunk state

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it defines the verdict semantics ('review' = decoded but attestation pending, show to user; 'reject' = do not sign), names the returned fields (displayText, intent, verification, warnings, signing policy), and warns never to guess selectors. It omits anything about auth requirements, rate limits, or network dependency for the KaiSign call.

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 verdict contract and output shape, which is the right priority, and organized under clear headings. The numbered step list partially restates the preceding paragraph (normalize → verify → return), and the 'Builder UX rule' passage is wordy for what it conveys.

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 20-parameter, no-output-schema tool this is largely sufficient: it describes the response block and verdict meanings in place of a schema. It leaves secondary gaps around large-payload pathways and failure modes, but nothing that would prevent a correct call.

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% across all 20 parameters, so baseline is 3. The description adds some framing about accepted payload shapes (direct, nested, aliases, rawTx) and implies the chunked-payload flow via put_payload_chunk, but it does not explain when to choose file inputs, gzip, or compact/responseMode beyond what the schema already says.

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 opening line states a specific verb and resource ('Clear-signs any transaction payload') and claims explicit primacy among siblings ('PRIMARY TOOL — use this for any transaction clear-signing, decoding, or safety question'). It also enumerates the accepted payload sources and the output block, so an agent can tell it apart from decode_transaction/validate_transaction.

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?

Strong usage context: 'Use this before any signing or broadcasting' plus the sequencing rule to call get_function_selectors for the target address + chainId before encoding each call. There is no explicit statement of when NOT to use it or which sibling to prefer for pure decoding, so it falls short of the top mark.

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