Skip to main content
Glama
LuciferForge

agent-safety-mcp

by LuciferForge

kya_generate_keypair

Generate Ed25519 keypairs for signing agent identity cards to establish secure audit trails within safety monitoring systems.

Instructions

Generate an Ed25519 keypair for signing agent identity cards.

Args: name: Key name (default "mcp-session"). Keys stored at ~/.kya/keys/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNomcp-session

Implementation Reference

  • The handler implementation for the `kya_generate_keypair` MCP tool, which generates an Ed25519 keypair and registers the tool using the `@mcp.tool()` decorator.
    @mcp.tool()
    def kya_generate_keypair(name: str = "mcp-session") -> dict:
        """Generate an Ed25519 keypair for signing agent identity cards.
    
        Args:
            name: Key name (default "mcp-session"). Keys stored at ~/.kya/keys/
        """
        global _kya_key_name
        try:
            priv_path, pub_path = generate_keypair(name)
            _kya_key_name = name
            return {
                "status": "generated",
                "private_key": str(priv_path),
                "public_key": str(pub_path),
                "note": "Use kya_sign_card to sign cards with this key.",
            }
        except Exception as e:
            return {"error": f"Failed to generate keypair: {e}. Install cryptography: pip install cryptography"}
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the algorithm (Ed25519) and storage location (~/.kya/keys/), which are critical behavioral traits. However, it fails to mention idempotency rules (overwriting existing keys), required permissions, or what the tool returns (file paths vs key content).

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 efficiently structured with a clear single-sentence purpose followed by Args documentation. No sentences are wasted. However, the docstring-style 'Args:' formatting is slightly rigid compared to natural language descriptions, though still perfectly readable.

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?

For a single-parameter tool without output schema or annotations, the description covers the essential purpose and parameter semantics. However, it leaves significant gaps regarding the return value (does it return key material, file paths, or just status?) and side-effect behavior (overwrite policies), which are important for a cryptographic generation tool.

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 description coverage is 0%, requiring the description to compensate. It successfully explains that 'name' refers to the 'Key name,' documents the default value 'mcp-session,' and provides critical context that keys are stored at ~/.kya/keys/, giving semantic meaning to the parameter beyond the bare schema.

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?

Clearly states the specific action (Generate), resource (Ed25519 keypair), and intended use case (for signing agent identity cards). The mention of 'signing' helps distinguish it from sibling tools like `kya_create_card` and `kya_verify_card`, though it doesn't explicitly contrast with `kya_sign_card` which likely consumes these keys.

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?

Provides implicit context by stating the keys are 'for signing agent identity cards,' suggesting it should be used before signing operations. However, it lacks explicit guidance on when to use this versus existing keys, prerequisites (e.g., directory permissions), or workflow sequence relative to `kya_sign_card`.

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/LuciferForge/agent-safety-mcp'

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