Skip to main content
Glama
getpara
by getpara

sign_raw

Sign arbitrary data using Multi-Party Computation (MPC) with a ready Para Wallet. Accepts 0x-prefixed hex strings and returns cryptographic signatures for secure blockchain operations.

Instructions

Sign arbitrary data with a wallet via MPC. The data must be a 0x-prefixed hex string. The wallet must be in "ready" status. Returns the signature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletIdYesThe wallet ID to sign with
dataYesData to sign as a 0x-prefixed hex string (e.g. "0x48656c6c6f")

Implementation Reference

  • The handler function for the 'sign_raw' tool, which processes arguments, validates input format, and calls the API.
    export async function handler(client: ParaClient, args: Record<string, unknown>) {
      const walletId = args.walletId as string;
      const data = args.data as string;
    
      if (!data.startsWith('0x') || !/^0x[0-9a-fA-F]+$/.test(data)) {
        return {
          content: [
            {
              type: 'text' as const,
              text: 'Error: data must be a 0x-prefixed hex string (e.g. "0x48656c6c6f"). To sign a UTF-8 string, first convert it to hex.',
            },
          ],
          isError: true,
        };
      }
    
      const result = await client.requestWithRetry<SignRawResponse>(
        `/v1/wallets/${walletId}/sign-raw`,
        { method: 'POST', body: { data } },
      );
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • The MCP definition object for 'sign_raw', including its name, description, and input schema.
    export const definition = {
      name: 'sign_raw',
      description:
        'Sign arbitrary data with a wallet via MPC. The data must be a 0x-prefixed hex string. The wallet must be in "ready" status. Returns the signature.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          walletId: {
            type: 'string',
            description: 'The wallet ID to sign with',
          },
          data: {
            type: 'string',
            description: 'Data to sign as a 0x-prefixed hex string (e.g. "0x48656c6c6f")',
          },
        },
        required: ['walletId', 'data'],
      },
    };
  • Zod schema definitions for 'sign_raw' request and response types.
    export const SignRawRequestSchema = z.object({
      data: z.string().regex(/^0x[0-9a-fA-F]+$/, 'data must be a 0x-prefixed hex string'),
    });
    export type SignRawRequest = z.infer<typeof SignRawRequestSchema>;
    
    export const SignRawResponseSchema = z.object({
      signature: z.string(),
    });
    export type SignRawResponse = z.infer<typeof SignRawResponseSchema>;
  • src/index.ts:30-30 (registration)
    The registration of the 'sign_raw' tool into the main tool list array.
    const tools = [createWallet, getWallet, signRaw, listWallets, waitForWallet];
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: the data format requirement ('0x-prefixed hex string'), the wallet status prerequisite ('must be in "ready" status'), and the return value ('Returns the signature'). However, it lacks details on error conditions, rate limits, or authentication needs, which are important for a signing operation.

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?

The description is extremely concise and front-loaded, with three sentences that each serve a distinct purpose: stating the action, specifying prerequisites, and indicating the return. There is no wasted language, making it easy for an AI agent to parse and understand quickly.

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?

Given the tool's complexity (a signing operation with prerequisites), lack of annotations, and no output schema, the description does a good job covering the essentials: purpose, input requirements, and return value. However, it could be more complete by addressing potential errors, security implications, or the signature format, which would help an agent use it more effectively.

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?

The schema description coverage is 100%, so the input schema already fully documents the parameters. The description adds minimal value beyond the schema by reiterating the data format requirement and wallet status, but does not provide additional semantic context or usage examples. This meets the baseline for high schema coverage.

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 clearly states the specific action ('Sign arbitrary data'), the resource ('with a wallet via MPC'), and distinguishes it from siblings by focusing on signing rather than wallet creation, retrieval, listing, or status waiting. It provides a precise verb+resource combination that leaves no ambiguity about the tool's function.

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 description provides clear context for when to use this tool: when you need to sign data with a wallet via MPC. It implicitly suggests using 'wait_for_wallet_ready' to ensure the wallet is in 'ready' status first, but does not explicitly name alternatives or state when not to use it, which prevents a perfect score.

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/getpara/para-wallet-mcp'

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