Skip to main content
Glama

Destroy a key

crypto_key_destroy
DestructiveIdempotent

Destroy a cryptographic key by overwriting its secret bytes where the runtime allows and invalidating its handle, preventing further use of the key.

Instructions

Destroy a key: overwrite its secret bytes where the runtime allows and invalidate its handle.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "keyHandle": "<keyHandle>"
    },
    "name": "crypto_key_destroy"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyHandleYesHandle of the key to destroy. Key handles look like 'kh_' followed by 32 hex characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description still adds genuine value: destruction is best-effort ('where the runtime allows') rather than guaranteed zeroization, and the handle becomes invalid afterward. It does not explain what happens to previously encrypted data or what occurs if the handle is unknown.

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?

A single front-loaded sentence: the action first, then the two effects. No filler, no restatement of the title, nothing wasted.

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?

For a one-parameter destructive tool with full annotation coverage and no output schema, the description covers the essential behavior. Minor gaps remain around error behavior for unknown handles and any downstream effects on data encrypted under the key.

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% and the single keyHandle parameter already documents its format and pattern. The description only refers to 'its handle' obliquely, adding no syntax or validation detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource ('Destroy a key') and immediately clarifies the mechanism: overwrite secret bytes and invalidate the handle. That is unmistakably distinct from siblings like crypto_generate_key or crypto_inspect_key.

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?

The description never says when to destroy versus alternatives, nor does it state prerequisites or exclusions (e.g., whether keys in use by an active session should be destroyed). Usage is only implied by the verb.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.