Skip to main content
Glama

select-profile

Choose an AWS profile and optional region for subsequent AWS interactions. Automatically handles SSO authentication if required, ensuring secure and streamlined access to AWS resources.

Instructions

Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileYesName of the AWS profile to select
regionNoRegion to use (if not provided, us-east-1 is used)

Implementation Reference

  • The main execution logic for the 'select-profile' tool. It parses the input arguments using SelectProfileSchema, fetches credentials for the specified profile using getCredentials function, updates the global selectedProfile, selectedProfileCredentials, and selectedProfileRegion state variables, and returns a success text response.
    } else if (name === "select-profile") {
      const { profile, region } = SelectProfileSchema.parse(args);
      const credentials = await getCredentials(
        profiles[profile],
        profile,
        profiles
      );
      selectedProfile = profile;
      selectedProfileCredentials = credentials;
      selectedProfileRegion = region || "us-east-1";
      return createTextResponse("Authenticated!");
  • Zod schema defining the input validation for the 'select-profile' tool: requires 'profile' string, optional 'region' string.
    const SelectProfileSchema = z.object({
      profile: z.string(),
      region: z.string().optional(),
    });
  • index.ts:91-109 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for 'select-profile'.
    {
      name: "select-profile",
      description:
        "Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication",
      inputSchema: {
        type: "object",
        properties: {
          profile: {
            type: "string",
            description: "Name of the AWS profile to select",
          },
          region: {
            type: "string",
            description: "Region to use (if not provided, us-east-1 is used)",
          },
        },
        required: ["profile"],
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about SSO authentication ('If needed, does SSO authentication'), which is not inferable from the input schema. However, it lacks details on side effects (e.g., whether this persists across sessions), error handling, or what 'subsequent interactions' specifically entails, leaving gaps in behavioral understanding.

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 extremely concise (two short sentences) and front-loaded with the primary purpose. Every word earns its place, with no redundant or vague phrasing, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's moderate complexity (configures context for AWS operations) and lack of annotations or output schema, the description is mostly complete. It covers the purpose, conditional SSO behavior, and usage context. However, it misses details on return values or error cases, which could be important for a tool that sets state, slightly reducing completeness.

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 schema description coverage is 100%, so the schema already fully documents both parameters ('profile' and 'region'). The description does not add any meaning beyond what the schema provides (e.g., it doesn't explain profile naming conventions or region implications), resulting in the baseline score of 3 for adequate but no extra value.

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 specific action ('Selects AWS profile') and resource ('for subsequent interactions'), with explicit mention of SSO authentication as a conditional behavior. It distinguishes from sibling tools like 'list-credentials' (which lists rather than selects) and 'run-aws-code' (which executes code rather than configuring context).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('for subsequent interactions') and implies it should be used before other AWS operations. However, it does not explicitly state when not to use it or name alternatives (e.g., when to use 'list-credentials' instead), which prevents a perfect score.

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

Related 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/RafalWilinski/aws-mcp'

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