Skip to main content
Glama

aws_query

Execute a single AWS API operation across selected accounts and regions, following pagination automatically and returning merged results.

Instructions

Run one AWS API call across every account a selector resolves to.

``service``/``operation``/``params`` follow the AWS CLI and botocore shape,
e.g. ``service="ec2"``, ``operation="DescribeInstances"``,
``params={"Filters": [{"Name": "instance-state-name", "Values": ["stopped"]}]}``.
Paginated operations are followed to completion automatically, so results
are complete rather than a silent first page. If a result is truncated,
raise ``max_items`` to collect more from each account.

``region`` is always required and never defaulted. Account selectors decide
which accounts are touched; with none given, every account in the active org
is targeted, subject to the configured blast-radius cap. The model never
picks which IAM role to assume - pass ``role=`` to override the
deterministic TOML/sole-grant resolution.

Any operation the assumed role may perform is dispatched - reads, writes,
deletes, secret reads, all of it - with AWS IAM as the sole authorization
boundary. Nothing is refused locally; if the role lacks permission, AWS
returns AccessDenied and that is what comes back.

Input Schema

NameRequiredDescriptionDefault
orgNo
orgsNo
roleNo
paramsNo
regionYes
serviceYes
max_itemsNo
operationYes
account_idNo
account_idsNo
environmentNo
account_nameNo
max_accountsNo
account_namesNo
name_containsNo
exclude_account_idsNo
exclude_account_namesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, this description carries the full burden and does it well: it discloses that reads, writes, deletes, and secret reads are all dispatched, that AWS IAM is the sole authorization boundary, that nothing is refused locally and AccessDenied is returned verbatim, that pagination is followed to completion, and that truncated results mean max_items should be raised. It also explains the blast-radius cap and the role-resolution rule, which are the non-obvious operational risks an agent must anticipate.

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?

It is front-loaded with purpose and the highest-risk facts (blast radius, no local refusal) appear early, with code formatting keeping the parameter examples scannable. It is slightly long and the account-selector discussion is compressed into one dense sentence that could have been split by parameter family.

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?

An output schema exists, so return shapes need not be described, and the mutation/authorization profile is thoroughly covered. The gap is the 17-parameter surface: with zero schema description coverage and no annotations, an agent still lacks the semantics of the many selector parameters needed to target accounts precisely rather than accidentally widening scope.

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%, so the description must compensate, and it only does so partially: it explains service, operation, params (with an example Filters shape), region, max_items, and role. The ten account-selector parameters (org/orgs, account_id/account_ids, account_name/account_names, environment, name_contains, and both exclude_* variants) are covered only collectively as "account selectors," with no indication of whether they combine, are mutually exclusive, or which to prefer for a given targeting need.

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?

"Run one AWS API call across every account a selector resolves to" gives a specific verb (run/dispatch), resource (AWS API call), and scope (fanned out over resolved accounts). The concrete service/operation/params examples make it unambiguous what kind of input is expected, and no sibling tool does anything comparable.

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?

It states clear operating context: region is always required and never defaulted, omitting selectors targets every account in the active org subject to the blast-radius cap, and role= overrides the deterministic TOML/sole-grant resolution. It never names an alternative sibling to use for account discovery (search_accounts, list_roles, explain_role_selection), so there is no explicit routing guidance, but the when-to-use context is otherwise solid.

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