Skip to main content
Glama

aws_ensure_credentials

Validates AWS credentials for the selected or active profile and automatically refreshes expired credentials using a cached SSO refresh token.

Instructions

Check if AWS credentials are valid, and automatically refresh using cached SSO refresh token if expired.

Args: profile_name: AWS profile name (defaults to the selected or active profile).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "aws_ensure_credentials"
  }
}

Input Schema

NameRequiredDescriptionDefault
profile_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose the important non-obvious behavior – it may mutate credential state by refreshing via a cached SSO refresh token – but it omits what happens when there is no cached token, when the profile is not SSO-based, whether it prompts interactively, and how failure is surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core sentence is front-loaded and free of waste. The trailing 'Args:' block is slightly redundant in style but does carry real information about the default.

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?

An output schema exists, so return values need not be explained. For a one-parameter credential check, the definition covers purpose, the refresh side effect, and the parameter default; only failure and non-SSO behavior are unaddressed.

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?

Schema description coverage is 0% for the single optional profile_name parameter, but the description compensates by explaining it defaults to the selected or active profile. That is the meaningful semantic an agent needs, though it doesn't cover valid name formats or behavior for unknown profiles.

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?

States a specific verb pair and resource: 'Check if AWS credentials are valid' plus 'automatically refresh... if expired'. The presence of a validity-check-plus-refresh action distinguishes it from siblings like aws_switch_profile or aws_get_caller_identity, which do different things to credentials.

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?

Usage is implied by the phrase 'if expired' – call it when you need valid credentials – but there is no explicit when-to-use or when-not guidance, and no pointer to aws_switch_profile for changing the active profile or aws_list_profiles for discovering names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.