Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

iam_get_token_info

Retrieves details of the current IAM token and associated IBM Cloud account.

Instructions

Get information about the current IAM token and account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The registerIAMTools function registers all IAM tools on the MCP server, including 'iam_get_token_info'.
    export function registerIAMTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) {
  • The tool handler: calls the IAM introspection endpoint to get information about the current IAM token and account. No input parameters (empty schema). Uses the safeTool wrapper for error handling.
    server.tool(
      "iam_get_token_info",
      "Get information about the current IAM token and account",
      {},
      async () => safeTool(async () => {
        return client.get(`${IBM_ENDPOINTS.IAM}/identity/introspect`, {});
      })
    );
  • The input schema is an empty object (no parameters required).
    {},
  • The safeTool helper wraps the handler to catch errors and return proper MCP formatted responses.
    export async function safeTool<T>(fn: () => Promise<T>): Promise<ReturnType<typeof successContent> | ReturnType<typeof errorContent>> {
      try {
        const result = await fn();
        return successContent(result);
      } catch (error) {
        return errorContent(error);
      }
    }
Behavior2/5

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

With no annotations, the description carries full burden. It only states 'get information' without disclosing what information is returned, required permissions, or side effects. Minimal behavioral insight.

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 is front-loaded with the action and resource. No unnecessary words.

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 zero-parameter tool, the description is adequate but could be improved by specifying what kind of information is returned (e.g., account ID, token expiry). It is minimally complete.

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?

The input schema has zero parameters, so the description does not need to add parameter details. Baseline of 4 is appropriate as nothing is missing.

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 verb 'Get' and the resource 'current IAM token and account', distinguishing it from siblings like iam_get_api_key or iam_get_service_id which target specific resources.

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_get_service_id. The description lacks context about authentication context or prerequisites.

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