Skip to main content
Glama
YawLabs

@yawlabs/aws-mcp

Official
by YawLabs

aws_assume_role

Assume an AWS role using STS and store temporary credentials as a local named profile in ~/.aws/credentials for cross-account access, without returning raw secret keys.

Instructions

Call STS AssumeRole and stash the returned temporary credentials as a named profile in ~/.aws/credentials. Subsequent calls to aws_call / aws_whoami / aws_paginate can use profile='mcp-' (or your overridden targetProfile name). The raw secret key / session token are NOT returned to the caller — only the profile name, expiration, and assumed identity. Use for cross-account access: a source profile (your SSO identity) assumes a role in another account. Default timeout is 120s (raise via timeoutMs for slow SAML / credential_process setups on cold start).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleArnYesTarget role ARN, e.g. 'arn:aws:iam::123456789012:role/CrossAccountAdmin'.
sessionNameYesRole session name (shows up in CloudTrail). Alphanumeric + +=,.@- only.
durationSecondsNoSession duration in seconds (900-43200). Default 3600.
externalIdNoExternal ID (only required if the role's trust policy demands it).
sourceProfileNoProfile to use as the assuming identity. Defaults to session profile / $AWS_PROFILE / 'default'.
targetProfileNoProfile name to write the temp creds under. Default 'mcp-<sessionName>'. Auto-prefixed with 'mcp-' if missing.
regionNoRegion for the STS call. Defaults to session region / $AWS_REGION.
timeoutMsNoTimeout in milliseconds for the underlying STS AssumeRole CLI call. Default 120000 (120s) -- gives cold-start SAML / credential_process setups headroom over runAwsCall's 60s default. Raise further for unusually slow IdPs.
Behavior4/5

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

Annotations indicate readOnlyHint=false and openWorldHint=true. The description adds significant behavior: writes to ~/.aws/credentials, does not return raw keys, returns profile name and expiration, and explains timeout default and adjustment. Could mention potential profile overwriting, but overall good.

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?

A single dense paragraph with all key information front-loaded. Every sentence adds value without redundancy. No wasted words.

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 8 parameters, no output schema, and side effects (file writing), the description covers the main behavior, parameter details, and security aspects (keys not returned). Slightly lacking mention of profile overwrite risk, but otherwise complete for practical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%. The description adds valuable context for each parameter: roleArn with example, sessionName with pattern and CloudTrail, durationSeconds with range and default, externalId condition, sourceProfile and targetProfile defaults and auto-prefix, region defaults, and timeoutMs with cold-start rationale.

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 tool's action: call STS AssumeRole and stash credentials as a named profile. It uses specific verbs and resources, and distinguishes from siblings like aws_call (which executes commands) and aws_whoami (which displays identity) by focusing on role assumption and credential caching.

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 a clear use case: cross-account access using a source profile to assume a role in another account. It explains how subsequent tools can use the stashed profile. However, it does not explicitly state when not to use this tool or contrast with alternatives like aws_session_set.

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

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