Skip to main content
Glama
YawLabs

@yawlabs/aws-mcp

Official
by YawLabs

aws_assume_role

Use STS AssumeRole to obtain temporary credentials from a source profile, store them as a named profile, and access another AWS account.

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.
Behavior5/5

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

Annotations only indicate readOnlyHint=false and destructiveHint=false. Description adds critical behavioral info: raw credentials are NOT returned (only profile name, expiration, identity), side-effect of writing to ~/.aws/credentials, and timeout default vs. runAwsCall's – all beyond what annotations convey.

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?

Five focused sentences with zero wasted words. Front-loaded with core action and outcome. Every sentence provides unique context (side effects, return info, timeout guidance, use case).

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

Completeness5/5

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

No output schema exists, but description details what is returned (profile name, expiration, identity). Covers all 8 parameters through schema descriptions and additional behavioral notes. Addresses timeout customization, prerequisites (source profile), and integration with sibling tools.

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

Parameters4/5

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

Schema coverage is 100% with per-parameter descriptions. Description adds extra value: explains timeoutMs vs runAwsCall default, auto-prefixing of targetProfile, and expansion of default behaviors. This justifies above baseline 3.

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?

Description specifies 'Call STS AssumeRole and stash the returned temporary credentials as a named profile' – a clear verb+resource+outcome. It distinguishes from sibling tools like aws_session_set by explaining that credentials are stored for reuse with aws_call/aws_whoami/aws_paginate, and frames it as 'cross-account access' use case.

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?

Explicitly states use case: 'Use for cross-account access: a source profile assumes a role in another account.' Also gives guidance on timeout adjustments for slow setups. Could note when to prefer aws_session_set over this, but the provided context is sufficient for most agents.

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