Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

iam_delete_api_key

Remove an API key from IBM Cloud by specifying its ID, revoking access.

Instructions

Delete an API key by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_key_idYesThe ID of the API key to delete

Implementation Reference

  • Tool handler for iam_delete_api_key - deletes an API key by its ID via the IAM Identity API.
    // ─── iam_delete_api_key ───────────────────────────────────────
    server.tool(
      "iam_delete_api_key",
      "Delete an API key by its ID",
      {
        api_key_id: z.string().describe("The ID of the API key to delete"),
      },
      async ({ api_key_id }) => safeTool(async () => {
        assertWriteAllowed(config.allowWrite);
        await client.delete(`${iamIdentityBase}/apikeys/${api_key_id}`);
        return { message: `API key ${api_key_id} deleted successfully` };
      })
    );
  • Input schema for iam_delete_api_key - requires a single string parameter 'api_key_id'.
    {
      api_key_id: z.string().describe("The ID of the API key to delete"),
    },
  • Registration of the tool named 'iam_delete_api_key' on the MCP server within the registerIAMTools function.
    // ─── iam_delete_api_key ───────────────────────────────────────
    server.tool(
      "iam_delete_api_key",
      "Delete an API key by its ID",
      {
        api_key_id: z.string().describe("The ID of the API key to delete"),
      },
      async ({ api_key_id }) => safeTool(async () => {
        assertWriteAllowed(config.allowWrite);
        await client.delete(`${iamIdentityBase}/apikeys/${api_key_id}`);
        return { message: `API key ${api_key_id} deleted successfully` };
      })
    );
Behavior3/5

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

The description explicitly states this is a delete (destructive) operation. However, no annotations are provided, and the description does not disclose any additional behavioral traits such as required permissions, irreversibility, or side effects.

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, concise sentence that directly conveys the tool's purpose with no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (single required parameter, no output schema), the description provides sufficient information for an AI agent to correctly invoke the tool.

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?

The input schema has 100% parameter description coverage (api_key_id is described). The tool description adds no additional semantic meaning beyond the schema, resulting in a baseline score of 3.

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?

The description clearly states the action ('Delete'), the resource ('API key'), and the required identifier ('by its ID'). It is specific and distinguishes from sibling tools like 'iam_create_api_key' and 'iam_get_api_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?

No guidance is provided on when to use this tool versus alternatives like 'iam_get_api_key' or 'iam_list_api_keys'. The description does not mention prerequisites, consequences, or exclusions.

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/ahmedselimmansor-ctrl/IBM_cloud_MCP_SERVER'

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