Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

generate_demo_key

Create test ECDSA key pairs for commerce flow trials. Provides public key hex for cart creation without requiring real wallet integration.

Instructions

Generate a demo ECDSA key pair for testing. Returns a public key hex that can be used with create_cart and other tools. Useful for trying out the commerce flow without a real wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'generate_demo_key' uses the built-in 'crypto' library to generate a random 65-byte uncompressed ECDSA public key, which is returned in the response as hex.
    case 'generate_demo_key': {
        const crypto = await import('crypto');
        // Generate a random 65-byte uncompressed ECDSA public key (04 prefix + 64 random bytes)
        const randomBytes = crypto.randomBytes(64);
        const publicKeyHex = '04' + randomBytes.toString('hex'); // 130 hex chars = 65 bytes uncompressed ECDSA
        return {
            content: [{
                type: 'text',
                text: JSON.stringify({
                    publicKey: publicKeyHex,
                    keyType: 'ECDSA (uncompressed, 65 bytes)',
                    note: 'This is a demo key for testing. Use it with create_cart to start shopping. For production, connect your MetaMask wallet or Dah.mx app at w3ship.com/setup-mcp to get your real key.',
                    usage: 'Call create_cart — the key will be used automatically, or pass it as the id parameter.',
                }, null, 2)
            }]
        };
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the return format ('public key hex') and testing purpose, but fails to clarify critical behavioral aspects: whether the private key is returned, stored server-side, or discarded, and whether multiple calls create conflicting keys.

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?

Three well-structured sentences with zero waste. Front-loaded with the core action ('Generate...'), followed by integration context ('can be used with create_cart'), and concluding with use-case rationale ('without a real wallet'). Every sentence earns its place.

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?

Appropriately complete for a zero-parameter tool lacking output schema. Covers generation purpose, output format, and integration with sibling tools. Minor gap regarding private key disposition and persistence, which would be valuable given the cryptographic nature of the operation.

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?

Input schema contains zero parameters, establishing a baseline of 4 per evaluation rules. No parameter description is needed, and the description correctly focuses on behavior and output rather than inventing parameter documentation.

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?

Description uses specific verb 'Generate' with clear resource 'demo ECDSA key pair' and scope 'for testing'. It distinguishes from siblings by emphasizing 'demo' and 'without a real wallet', clearly positioning it as a testing utility distinct from production wallet operations.

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?

Provides clear context on when to use ('trying out the commerce flow without a real wallet', 'testing') and explicitly names sibling tool 'create_cart' as a consumer of the output. Lacks explicit negative guidance (e.g., 'do not use in production'), though this is strongly implied.

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/baskcart/w3ship-mcp-server'

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