Skip to main content
Glama

user_delete_api_key

Delete API keys for Crafty Controller users to manage access and revoke permissions. Specify user ID and key ID to remove authentication credentials.

Instructions

Revoke/delete an API key for a Crafty Controller user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesUser ID or '@me'
key_idYesAPI key ID to revoke

Implementation Reference

  • The implementation of the user_delete_api_key tool, which handles the revocation/deletion of an API key via a DELETE request to the Crafty Controller API.
    server.tool(
      "user_delete_api_key",
      "Revoke/delete an API key for a Crafty Controller user",
      {
        user_id: z.string().describe("User ID or '@me'"),
        key_id: z.string().describe("API key ID to revoke"),
      },
      async ({ user_id, key_id }) => {
        try {
          const data = await client.delete(`/users/${user_id}/api/${key_id}`);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'revoke/delete' an API key, which implies a destructive mutation, but doesn't specify whether this action is reversible, requires specific permissions, has side effects (e.g., affecting active sessions), or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse. There's zero waste or redundancy, achieving optimal conciseness for this context.

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 the tool's complexity (a destructive mutation with no annotations and no output schema), the description is incomplete. It lacks details on behavioral traits (e.g., irreversibility, permissions), output expectations, or error handling. While the schema covers parameters well, the overall context for safe and effective use is insufficient, especially for a tool that modifies system state.

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%, with both parameters ('user_id' and 'key_id') documented in the schema. The description doesn't add any semantic details beyond what the schema provides (e.g., it doesn't explain format examples or constraints like '@me' usage). Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 action ('revoke/delete') and resource ('API key for a Crafty Controller user'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'user_create_api_key' and 'user_get_api_keys' by focusing on deletion rather than creation or retrieval. However, it doesn't specify whether this affects all keys or just one, which slightly limits specificity.

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 provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. While the tool name and description imply it's for deleting API keys, there's no mention of when this operation is appropriate (e.g., after key compromise) or how it relates to similar tools like 'user_delete' for broader user management. This lack of context leaves the agent to infer usage scenarios.

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/HadiCherkaoui/crafty-mcp'

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