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";

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

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