Skip to main content
Glama
eunyuljo

aws-helper MCP Server

by eunyuljo

get_aws_identity

Retrieve AWS identity details including account, user, and role information for the current MCP server session to verify authentication status.

Instructions

현재 MCP 서버가 사용하는 AWS 자격증명의 계정/사용자/Role 정보를 반환합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoAWS 리전 (기본값: ap-northeast-2)ap-northeast-2

Implementation Reference

  • The handler function that implements the get_aws_identity tool logic: creates STSClient with env credentials, calls GetCallerIdentityCommand, and returns AWS account, UserId, and ARN.
    async function getAwsIdentity(args: { region?: string }) {
      const region = args?.region || 'ap-northeast-2';
      const credentials: AwsCredentialIdentity = {
        accessKeyId: process.env.AWS_ACCESS_KEY_ID || '',
        secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '',
        sessionToken: process.env.AWS_SESSION_TOKEN
      };
      const client = new STSClient({
        region,
        credentials
      });
      const command = new GetCallerIdentityCommand({});
      const response = await client.send(command);
      return {
        content: [
          {
            type: 'text',
            text: `AWS 계정 정보\n\n• Account: ${response.Account}\n• UserId: ${response.UserId}\n• Arn: ${response.Arn}`
          }
        ]
      };
    }
  • src/index.ts:69-82 (registration)
    Registration of the get_aws_identity tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_aws_identity',
      description: '현재 MCP 서버가 사용하는 AWS 자격증명의 계정/사용자/Role 정보를 반환합니다',
      inputSchema: {
        type: 'object',
        properties: {
          region: {
            type: 'string',
            description: 'AWS 리전 (기본값: ap-northeast-2)',
            default: 'ap-northeast-2'
          }
        }
      }
    }
  • src/index.ts:99-100 (registration)
    Dispatcher case in the CallToolRequestHandler switch statement that routes calls to the getAwsIdentity handler.
    case 'get_aws_identity':
      return await getAwsIdentity((args ?? {}) as { region?: string });
  • Input schema definition for the get_aws_identity tool, specifying optional region parameter.
    inputSchema: {
      type: 'object',
      properties: {
        region: {
          type: 'string',
          description: 'AWS 리전 (기본값: ap-northeast-2)',
          default: 'ap-northeast-2'
        }
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'returns' information, implying a read-only operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or what specific data is included in the return. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

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 in Korean that directly states the tool's purpose. It's front-loaded with the core functionality and has no wasted words, making it easy to parse quickly.

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 no annotations, no output schema, and a simple input schema, the description is minimally adequate. It explains what the tool does but lacks details on return format, error handling, or behavioral context. For a tool that returns credential information, more completeness would help the agent understand what to expect.

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% description coverage, with one optional parameter 'region' clearly documented. The description doesn't add any parameter semantics beyond what the schema provides (e.g., it doesn't explain why region matters for identity queries or default behavior). Baseline 3 is appropriate since the schema does the heavy lifting.

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 tool's purpose: 'returns account/user/Role information for the AWS credentials currently used by the MCP server.' It specifies the verb ('returns') and resource ('AWS credentials information'), but doesn't explicitly differentiate it from sibling tools like get_ec2_instances or get_ec2_summary, which appear to be EC2-specific while this is about identity credentials.

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. It doesn't mention sibling tools, prerequisites, or specific contexts where this tool is appropriate versus other AWS-related tools. The agent must infer usage from the purpose alone.

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/eunyuljo/sample-mcp-server-with-claude-desktop'

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