Skip to main content
Glama

Sign data

crypto_sign
Read-onlyIdempotent

Signs data with a key handle, automatically applying the key's algorithm: Ed25519, RSASSA-PSS, ECDSA, ML-DSA, or HMAC-SHA256. Use it to produce cryptographic signatures or MACs for verification.

Instructions

Sign data with a key handle. The algorithm follows the key: Ed25519, RSASSA-PSS (SHA-256), ECDSA (SHA-256; SHA-384 on P-384), ML-DSA (44, 65, 87, FIPS 204), or HMAC-SHA256.

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": {
      "data": "<data>",
      "keyHandle": "<keyHandle>"
    },
    "name": "crypto_sign"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesData string to sign.
keyHandleYesHandle of an ed25519, rsa, ecc, ml-dsa, or hmac-sha256 key. Key handles look like 'kh_' followed by 32 hex characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds genuine behavioral context beyond that: the algorithm is selected by the key rather than by the caller, and the exact signature scheme per key family is listed. It does not disclose error behavior for mismatched key types or the signature output encoding.

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 sentences, front-loaded with the action and the key linkage, then the algorithm list. Every clause carries information an agent needs; there is no boilerplate or repetition of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should say something about what a successful call returns, and the signature encoding (hex, base64, raw bytes) is never stated. Inputs and algorithm behavior are well covered, so the definition is adequate but leaves a meaningful gap for a signing tool whose only real output is the signature.

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%, so the parameters themselves are documented; baseline would be 3. The description still adds new meaning by mapping each key family (Ed25519, RSA, ECC, ML-DSA, HMAC) to its concrete signature algorithm, clarifying that callers cannot pick an algorithm and that P-384 implies SHA-384.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Sign data with a key handle" gives a specific verb and resource, and the algorithm enumeration narrows the scope to the signing family. It doesn't explicitly distinguish itself from siblings like crypto_hash or crypto_verify, so it stops short of a 5, but an agent can identify the operation immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: signing is the counterpart of the crypto_verify sibling, and the key handle determines the algorithm. There is no explicit statement of when to prefer this over crypto_hash or crypto_hmac-style siblings, and no prerequisites or exclusions are stated.

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