aws_query
Executes a single AWS API call across selected accounts or an organization's accounts, auto-paginates, and returns 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, and neither does the caller: the role comes only
from the ``[portals.<org>.environments.*]`` rules in your TOML config.
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.
Operations that delete, terminate or detach something (``Delete*``,
``Terminate*``, ``Remove*``, ``Detach*`` and similar) first ask the user to
confirm, listing the accounts and parameters. If they decline, or the client
cannot ask, nothing runs. Do not retry a declined call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"service": "<service>",
"operation": "<operation>",
"region": "<region>"
},
"name": "aws_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | No | ||
| orgs | No | ||
| params | No | ||
| region | Yes | ||
| service | Yes | ||
| max_items | No | ||
| operation | Yes | ||
| account_id | No | ||
| account_ids | No | ||
| environment | No | ||
| account_name | No | ||
| max_accounts | No | ||
| account_names | No | ||
| name_contains | No | ||
| exclude_account_ids | No | ||
| exclude_account_names | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||