Skip to main content
Glama

sign_transaction

Signs raw unsigned blockchain transactions for EVM or Solana networks without broadcasting them, returning signed data, parsed operations, and policy evaluation results.

Instructions

Sign an unsigned transaction without broadcasting. Provide raw transaction (base64 for Solana, hex for EVM). Returns signed transaction, parsed operations, and policy evaluation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionYesRaw unsigned transaction (base64 for Solana, hex 0x-prefixed for EVM)
networkNoTarget network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.

Implementation Reference

  • The registration and handler implementation for the 'sign_transaction' MCP tool. It validates inputs via Zod and calls the API endpoint /v1/transactions/sign.
    export function registerSignTransaction(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'sign_transaction',
        withWalletPrefix(
          'Sign an unsigned transaction without broadcasting. Provide raw transaction (base64 for Solana, hex for EVM). Returns signed transaction, parsed operations, and policy evaluation.',
          walletContext?.walletName,
        ),
        {
          transaction: z.string().describe('Raw unsigned transaction (base64 for Solana, hex 0x-prefixed for EVM)'),
          network: z.string().optional().describe('Target network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
        },
        async (args) => {
          const body: Record<string, unknown> = { transaction: args.transaction };
          if (args.network) {
            body['network'] = args.network;
          }
          if (args.wallet_id) body.walletId = args.wallet_id;
          const result = await apiClient.post('/v1/transactions/sign', body);
          return toToolResult(result);
        },
      );
    }
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and succeeds in revealing return structure ('signed transaction, parsed operations, and policy evaluation') and format requirements (base64 vs hex). It appropriately notes policy evaluation occurs during signing. Minor gaps remain around side effects (storage, replay protection) and authorization requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two efficient sentences front-load the action and scope, immediately follow with input format requirements, and close with return value disclosure. No redundancy with the schema or title; every clause adds distinct value.

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 transaction-signing tool with 100% schema coverage but no output schema, the description adequately compensates by detailing the return payload (signed tx, parsed ops, policy eval) and noting the multi-chain domain (Solana/EVM). It could improve by mentioning security checks or approval flows inherent to signing operations.

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%, establishing a baseline of 3. The description adds value by reinforcing the format expectations ('base64 for Solana, hex for EVM') and implying the transaction parameter must be raw/unsigned. It doesn't elaborate on network or wallet_id semantics beyond the schema, keeping it slightly above baseline.

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 opens with a specific verb and resource ('Sign an unsigned transaction') and immediately scopes the behavior ('without broadcasting'), which clearly distinguishes it from broadcasting siblings like send_token or send_batch. The multi-chain support (Solana/EVM) further clarifies the resource scope.

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 phrase 'without broadcasting' provides clear implicit guidance on when to use this tool versus send_* alternatives. However, it lacks explicit mention of when to prefer this over sign_userop (for ERC-4337 operations) or sign_message, and omits prerequisites like needing an unsigned transaction first.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minhoyoo-iotrust/WAIaaS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server