Skip to main content
Glama
Frontier-Compute

Frontier-Compute/zcash-mcp

zcash_shield

Shield ZEC by moving from transparent MPC custody to private Orchard pool with ZAP1 attestation.

Instructions

Move ZEC from transparent (MPC custody) to shielded Orchard pool (local custody). The transparent side is signed via Ika MPC. The shielded side uses the local Orchard wallet. Every custody transition is attested to ZAP1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idYesdWallet object ID (transparent side)
encryption_seedYesHex encryption seed from wallet creation
shielded_addressYesZcash unified address (u1...) for the Orchard pool
amount_zatoshisYesAmount in zatoshis to shield
memoNoOptional memo for the shielding transaction
sui_private_keyYesSui private key for the MPC sign transaction

Implementation Reference

  • The full implementation of the zcash_shield tool handler. It registers a server tool named 'zcash_shield' that accepts wallet_id, encryption_seed, shielded_address, amount_zatoshis, memo, and sui_private_key parameters. The handler computes the ZEC amount, returns a detailed flow description (UTXO listing, transaction building, sighash computation, Ika 2PC-MPC signing, broadcasting, and attestation), and returns the result as JSON. Error handling is included.
    export function registerShieldTool(server: McpServer) {
      server.tool(
        "zcash_shield",
        "Move ZEC from transparent (MPC custody) to shielded Orchard pool (local custody). " +
          "The transparent side is signed via Ika MPC. The shielded side uses the local Orchard wallet. " +
          "Every custody transition is attested to ZAP1.",
        {
          wallet_id: z.string().describe("dWallet object ID (transparent side)"),
          encryption_seed: z.string().describe("Hex encryption seed from wallet creation"),
          shielded_address: z.string().describe("Zcash unified address (u1...) for the Orchard pool"),
          amount_zatoshis: z.number().int().positive().describe("Amount in zatoshis to shield"),
          memo: z.string().max(512).optional().describe("Optional memo for the shielding transaction"),
          sui_private_key: z.string().describe("Sui private key for the MPC sign transaction"),
        },
        async ({ wallet_id, shielded_address, amount_zatoshis, memo }) => {
          try {
            const zec = amount_zatoshis / 1e8;
    
            const result = {
              status: "shield_flow",
              description: `Shield ${zec} ZEC from MPC custody to Orchard pool`,
              flow: [
                "1. List UTXOs on the t-addr (Zebra: z_listunspent)",
                "2. Build transparent TX: t-addr -> shielded_address",
                "3. Compute sighash (DoubleSHA256)",
                "4. Sign via Ika 2PC-MPC (secp256k1/ECDSA)",
                "5. Attach signature to TX",
                "6. Broadcast via Zebra (sendrawtransaction)",
                "7. Attest custody transition to ZAP1 (AGENT_ACTION)",
              ],
              custody_transition: {
                from: "MPC (split-key, neither party holds full key)",
                to: "Local Orchard wallet (RedPallas, full privacy)",
              },
              wallet_id,
              shielded_address,
              amount_zatoshis,
              memo: memo || null,
              note: "After shielding, ZEC is in the Orchard pool with full Zcash privacy. " +
                "The MPC wallet still exists for receiving new deposits.",
            };
    
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          } catch (err) {
            const msg = err instanceof Error ? err.message : String(err);
            return { content: [{ type: "text" as const, text: `Error: ${msg}` }], isError: true };
          }
        }
      );
    }
  • src/index.ts:50-50 (registration)
    Registration of the shield tool in the main server entry point. registerShieldTool(server) is called to register zcash_shield on the MCP server.
    registerShieldTool(server);
Behavior3/5

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

With no annotations, the description discloses the MPC signing on the transparent side and local wallet on the shielded side, and the ZAP1 attestation. However, it does not mention potential failures, irreversibility, or authentication 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?

The description is concise with three short sentences, no filler, and the key action is front-loaded.

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 no output schema and no annotations, the description covers the core flow and custody details. It lacks information about output format or error conditions but is sufficient for general understanding.

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%, so the baseline is 3. The description does not add additional meaning beyond what the schema provides for each parameter.

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 action ('Move ZEC from transparent to shielded Orchard pool') and distinguishes it from siblings like send_shielded or zcash_create_wallet. It specifies the custody transition and pool type.

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 explains the process and custody roles (MPC vs local Orchard) and mentions attestation to ZAP1, but does not explicitly state when not to use this tool or contrast with alternatives.

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/Frontier-Compute/zcash-mcp'

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