Skip to main content
Glama

get_aws_caller_identity

Verify AWS IAM credentials by returning the current caller identity (user or role) to confirm authentication status.

Instructions

Returns the AWS IAM caller identity (user/role) to verify credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'get_aws_caller_identity' tool. It uses the STSClient to send a GetCallerIdentityCommand and returns the AWS account, UserId, and ARN as JSON.
    if (name === "get_aws_caller_identity") {
        const command = new GetCallerIdentityCommand({});
        const response = await stsClient.send(command);
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(
                        {
                            UserId: response.UserId,
                            Account: response.Account,
                            Arn: response.Arn,
                        },
                        null,
                        2
                    ),
                },
            ],
        };
    }
  • src/index.ts:97-104 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and empty input schema (no parameters required).
    {
        name: "get_aws_caller_identity",
        description: "Returns the AWS IAM caller identity (user/role) to verify credentials.",
        inputSchema: {
            type: "object",
            properties: {},
        },
    },
  • Input schema for the tool: an empty object, indicating no input parameters are needed.
    inputSchema: {
        type: "object",
        properties: {},
    },
  • Instantiation of the STSClient used by the get_aws_caller_identity handler.
    const stsClient = new STSClient({});
  • Import of STSClient and GetCallerIdentityCommand required for the tool implementation.
    import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts";
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. It mentions the tool returns identity information for verification but lacks details on behavioral traits such as rate limits, authentication requirements, error handling, or response format. This is a significant gap for a tool with zero annotation coverage.

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 front-loads the purpose without unnecessary details. Every word contributes to understanding the tool's function, making it highly concise and well-structured.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains the purpose but lacks behavioral context like response format or error conditions, which is important for a tool with no structured data to compensate.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, which is appropriate, earning a baseline score of 4 for this dimension.

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 ('Returns') and resource ('AWS IAM caller identity'), specifying it's used to verify credentials. It distinguishes from siblings by focusing on identity verification rather than resource listing or monitoring, though it doesn't explicitly name alternatives.

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?

The description implies usage for credential verification, providing some context. However, it doesn't explicitly state when to use this tool versus alternatives like checking IAM users or roles directly, nor does it mention prerequisites like required AWS permissions.

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/bhaveshopss/MCP-server'

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