Skip to main content
Glama
CWNApps

TrustAtom MCP Server

by CWNApps

verify_trustatom

Verify the integrity of TrustAtom receipts by confirming Ed25519 signatures are authentic and receipts haven't been tampered with for compliance and auditing.

Instructions

Verify the integrity of an existing TrustAtom receipt. Confirms the Ed25519 signature is authentic and the receipt hasn't been tampered with.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
receipt_idYesThe TrustAtom receipt ID (e.g., ta_01hx9k...)

Implementation Reference

  • The core logic that verifies the Ed25519 signature of a TrustAtom receipt.
    export function verifyTrustAtom(
      receipt: TrustAtomReceipt,
    ): VerifyResult {
      try {
        const sig = naclUtil.decodeBase64(receipt.signature_b64);
        const pubKey = naclUtil.decodeBase64(receipt.public_key_b64);
        const msg = naclUtil.decodeUTF8(receipt.evidence_hash);
    
        const valid = nacl.sign.detached.verify(msg, sig, pubKey);
    
        return {
          valid,
          reason: valid
            ? "Ed25519 signature verified — receipt is authentic"
            : "Signature mismatch — receipt may have been tampered with",
          receipt_id: receipt.id,
          public_key_b64: receipt.public_key_b64,
        };
      } catch (e: unknown) {
        return {
          valid: false,
          reason: `Verification failed: ${e instanceof Error ? e.message : String(e)}`,
          receipt_id: receipt.id,
          public_key_b64: receipt.public_key_b64,
        };
      }
    }
  • src/server.ts:193-217 (registration)
    The MCP tool handler case for "verify_trustatom" in src/server.ts, which calls the verification logic.
    case "verify_trustatom": {
      const receiptId = String(args?.receipt_id ?? "");
      const found = ledger.find((r) => r.id === receiptId);
    
      if (!found) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                valid: false,
                reason: `Receipt ${receiptId} not found in ledger`,
              }),
            },
          ],
        };
      }
    
      const result = verifyTrustAtom(found);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral context. It states the verification purpose but doesn't disclose critical traits like required permissions, rate limits, error conditions, or what happens on failure (e.g., returns error vs null). The mention of 'Ed25519 signature' adds some technical context, but overall disclosure is inadequate for a security-focused tool.

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 concise sentences with zero waste: the first states the purpose, and the second adds technical specificity. It's front-loaded and appropriately sized for a single-parameter tool.

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

Completeness2/5

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

Given the complexity (security verification), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values (e.g., success/failure indicators, timestamps), error handling, or dependencies on other tools. For a tool with no structured behavioral data, more context is needed.

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 description coverage is 100%, so the schema already documents the 'receipt_id' parameter. The description implies the parameter is used for verification but doesn't add syntax, format, or validation details beyond what the schema provides (e.g., examples of valid IDs). Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('verify integrity'), target resource ('existing TrustAtom receipt'), and technical details ('Ed25519 signature authenticity', 'tampering check'). It distinguishes from siblings like 'create_trustatom' (creation vs verification) and 'query_receipts' (listing vs validation).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a receipt ID from another operation), exclusions, or comparisons to siblings like 'get_compliance_report' or 'query_receipts' for related verification tasks.

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/CWNApps/trustatom-mcp'

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