Skip to main content
Glama
joadataarg

MIST.cash MCP Server

by joadataarg

generar_secreto_transaccion

Generate cryptographic transaction secrets for private payments on Starknet using claiming keys and recipient addresses.

Instructions

Generate a transaction secret for private payments. Creates a cryptographic secret using a claiming key and recipient address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
claiming_keyYesClaiming key for the transaction
recipient_addressYesStarknet address of the recipient (must start with 0x)

Implementation Reference

  • Core handler function that validates input parameters using Zod schema, checks Starknet address validity, generates transaction secret using txSecret from @mistcash/crypto, and returns structured response.
    export async function generarSecretoTransaccion(params) {
        // Validate parameters
        const validated = GenerarSecretoTransaccionSchema.parse(params);
        // Additional validation
        if (!isValidStarknetAddress(validated.recipient_address)) {
            throw new Error(`Invalid recipient address format: ${validated.recipient_address}`);
        }
        try {
            // Generate transaction secret using MIST.cash crypto
            const secret = txSecret(validated.claiming_key, validated.recipient_address);
            return {
                success: true,
                secret,
                claiming_key: validated.claiming_key,
                recipient_address: validated.recipient_address
            };
        }
        catch (error) {
            throw new Error(`Failed to generate transaction secret: ${error.message}`);
        }
    }
  • Zod validation schema for tool inputs: requires claiming_key (non-empty string) and recipient_address (valid Starknet address).
    export const GenerarSecretoTransaccionSchema = z.object({
        claiming_key: z.string().min(1, 'Claiming key is required'),
        recipient_address: StarknetAddressSchema
    });
  • src/index.ts:46-62 (registration)
    Tool registration in MCP server's ListTools handler, defining name, description, and JSON schema for inputs.
        name: 'generar_secreto_transaccion',
        description: 'Generate a transaction secret for private payments. Creates a cryptographic secret using a claiming key and recipient address.',
        inputSchema: {
            type: 'object',
            properties: {
                claiming_key: {
                    type: 'string',
                    description: 'Claiming key for the transaction',
                },
                recipient_address: {
                    type: 'string',
                    description: 'Starknet address of the recipient (must start with 0x)',
                },
            },
            required: ['claiming_key', 'recipient_address'],
        },
    },
  • src/index.ts:166-175 (registration)
    Dispatch handler in MCP server's CallToolRequestSchema switch statement, invoking the generarSecretoTransaccion function with arguments and formatting response.
    case 'generar_secreto_transaccion':
        return {
            content: [
                {
                    type: 'text',
                    text: JSON.stringify(await generarSecretoTransaccion(args), null, 2),
                },
            ],
        };
  • src/index.ts:18-18 (registration)
    Import statement bringing the handler function into the main server file.
    import { generarSecretoTransaccion } from './tools/generar-secreto.js';
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Creates a cryptographic secret' which implies a write operation, but lacks details on permissions, side effects, rate limits, or response format. For a tool that likely involves sensitive data (transaction secrets), this is a significant gap in behavioral disclosure.

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

Conciseness4/5

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

The description is concise and front-loaded with the main purpose in the first sentence. Both sentences are relevant, with no wasted words. However, it could be slightly more structured by separating usage context from parameter mentions.

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 no annotations, no output schema, and a tool that creates cryptographic secrets (likely a mutation with security implications), the description is incomplete. It doesn't cover error conditions, return values, or important behavioral traits like whether the secret is stored or transient. For this complexity level, 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 both parameters ('claiming_key' and 'recipient_address'). The description adds minimal value by mentioning these parameters in context ('using a claiming key and recipient address'), but doesn't provide additional semantics beyond what the schema offers. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Generate a transaction secret for private payments' specifies the verb (generate) and resource (transaction secret) with context (private payments). It distinguishes from siblings like 'calcular_hash_transaccion' (calculate hash) and 'verificar_existencia_transaccion' (verify existence) by focusing on secret generation, though it doesn't explicitly contrast them.

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. The description mentions 'private payments' as context but doesn't specify prerequisites, conditions, or comparisons to sibling tools like 'obtener_assets_transaccion' (get transaction assets). Without explicit when/when-not instructions, usage is implied but not well-defined.

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/joadataarg/Mcp-mistcash'

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