Skip to main content
Glama

Inspect AWS Infrastructure

awsinspect
Read-only

INSPECTION: Inspect AWS infrastructure for a deployed project ⚠️ PREREQUISITE: This tool requires a prior deployment ATTEMPT (successful or failed). Check convostatus for hasDeployAttempt=true before calling. Works even after failed deploys to inspect orphaned resources.

Inspect deployed AWS resources after a deployment attempt. Use this tool when the user asks about the status or details of their deployed infrastructure. It fetches temporary read-only credentials securely and queries the AWS API directly.

RESPONSE TIERS (default is summary for token efficiency):

  • Summary (default): Key fields only (~500 tokens). Set detail=false, raw=false or omit both.

  • Detail: Full metadata for a specific resource. Set detail=true + resource filter.

  • Raw: Complete unprocessed API response. Set raw=true.

REQUIRES: session_id from convoopen response (format: sess_v2_...). Supported services: account, acm, alb, apigateway, apprunner, backup, bedrock, cloudfront, cloudwatchlogs, cognito, cost-explorer, dynamodb, ebs, ec2, ecs, eks, elasticache, kms, lambda, msk, opensearch, rds, route53, s3, sagemaker, secretsmanager, sqs, vpc, waf For a specific service's actions, call with action="list-actions". METRICS: Use list-metrics to discover available metrics for a service (no credentials needed). Then use get-metrics to retrieve data (auto-discovers resources). Most services return CloudWatch time-series. KMS returns key health (rotation, state). SecretsManager returns secret health (rotation, last accessed/rotated). Optional filters JSON: {"hours":6,"period":300}. BILLING: Use service=cost-explorer to inspect AWS costs. Actions: get-cost-summary (last 30 days by service, filters: {"days":7,"granularity":"DAILY"}), get-cost-forecast (projected spend through end of month), get-cost-by-tag (costs grouped by tag, filters: {"tag_key":"Environment","days":30}). Requires ce:GetCostAndUsage and ce:GetCostForecast IAM permissions.

EXAMPLES:

  • awsinspect(session_id=..., service="ec2", action="describe-instances")

  • awsinspect(session_id=..., service="cost-explorer", action="get-cost-summary")

  • awsinspect(session_id=..., service="ec2", action="get-metrics", filters="{"hours":6}")

  • awsinspect(session_id=..., service="rds", action="describe-db-instances", detail=true)

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": {
      "session_id": "<session_id>",
      "service": "<service>",
      "action": "<action>",
      "filters": "<filters>",
      "detail": "<detail>",
      "raw": "<raw>"
    },
    "name": "awsinspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawYesWhen true, returns the unprocessed AWS API response. Escape hatch for fields the summarized response doesn't surface.
actionYesOperation on the service. Examples: 'describe-instances' (ec2), 'list-buckets' (s3), 'list-keys' (kms), 'get-cost-summary' (cost-explorer), 'list-actions' (discovery), 'list-metrics' / 'get-metrics' (CloudWatch).
detailYesWhen true, returns full metadata for a single resource (requires a resource ID in filters). When false (default), returns a summary.
filtersYesOptional JSON-encoded filter object passed through to the underlying AWS API. Examples: '{"hours":6}' for metric windows, '{"days":7,"granularity":"DAILY"}' for cost queries.
serviceYesAWS service to query. Examples: 'ec2', 'rds', 'vpc', 's3', 'lambda', 'eks', 'ecs', 'cost-explorer'. Use action='list-actions' to discover the supported actions for a service.
session_idYesSession ID from convoopen — pass back EXACTLY as returned, including the ?token=... suffix (format: sess_v2_*?token=*). The suffix is part of the session credential; never strip it when summarizing. The session must have an AWS deploy attempt before inspect probes will succeed.

Output Schema

NameRequiredDescriptionDefault
hintsNoGuidance for the calling agent: what to do next and which tools relate to this result.
resultNoThe AWS inspect result. A list action returns a summary object (count plus the listed items) when summarized is true; detail and raw actions return the backend result unchanged.
summarizedNoTrue when result is a compact summary instead of the full backend response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "hints": {
      +      "description": "Guidance for the calling agent: what to do next and which tools relate to this result.",
      +      "properties": {
      +        "next_actions": {
      +          "description": "Suggested next steps, in order, often as ready-to-run tool calls.",
      +          "items": {
      +            "description": "One suggested next step.",
      +            "type": "string"
      +          },
      +          "type": [
      +            "null",
      +            "array"
      +          ]
      +        },
      +        "related_tools": {
      +          "description": "Names of tools that are useful after this result.",
      +          "items": {
      +            "description": "A tool name.",
      +            "type": "string"
      +          },
      +          "type": [
      +            "null",
      +            "array"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "result": {
      +      "description": "The AWS inspect result. A list action returns a summary object (count plus the listed items) when summarized is true; detail and raw actions return the backend result unchanged."
      +    },
      +    "summarized": {
      +      "description": "True when result is a compact summary instead of the full backend response.",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / service / enum
      Previous value: -[
      -  "account",
      -  "alb",
      -  "apigateway",
      -  "backup",
      -  "bedrock",
      -  "cloudfront",
      -  "cloudwatchlogs",
      -  "cognito",
      -  "cost-explorer",
      -  "dynamodb",
      -  "ebs",
      -  "ec2",
      -  "ecs",
      -  "eks",
      -  "elasticache",
      -  "kms",
      -  "lambda",
      -  "msk",
      -  "opensearch",
      -  "rds",
      -  "s3",
      -  "secretsmanager",
      -  "sqs",
      -  "vpc",
      -  "waf"
      -]New value: +[
      +  "account",
      +  "acm",
      +  "alb",
      +  "apigateway",
      +  "apprunner",
      +  "backup",
      +  "bedrock",
      +  "cloudfront",
      +  "cloudwatchlogs",
      +  "cognito",
      +  "cost-explorer",
      +  "dynamodb",
      +  "ebs",
      +  "ec2",
      +  "ecs",
      +  "eks",
      +  "elasticache",
      +  "kms",
      +  "lambda",
      +  "msk",
      +  "opensearch",
      +  "rds",
      +  "route53",
      +  "s3",
      +  "sagemaker",
      +  "secretsmanager",
      +  "sqs",
      +  "vpc",
      +  "waf"
      +]
  3. Changed8 schema fields changed
    • addedInput schema / properties / action / description
      Added value: +"Operation on the service. Examples: 'describe-instances' (ec2), 'list-buckets' (s3), 'list-keys' (kms), 'get-cost-summary' (cost-explorer), 'list-actions' (discovery), 'list-metrics' / 'get-metrics' (CloudWatch)."
    • addedInput schema / properties / detail / description
      Added value: +"When true, returns full metadata for a single resource (requires a resource ID in filters). When false (default), returns a summary."
    • addedInput schema / properties / filters / description
      Added value: +"Optional JSON-encoded filter object passed through to the underlying AWS API. Examples: '{\"hours\":6}' for metric windows, '{\"days\":7,\"granularity\":\"DAILY\"}' for cost queries."
    • addedInput schema / properties / raw / description
      Added value: +"When true, returns the unprocessed AWS API response. Escape hatch for fields the summarized response doesn't surface."
    • addedInput schema / properties / service / description
      Added value: +"AWS service to query. Examples: 'ec2', 'rds', 'vpc', 's3', 'lambda', 'eks', 'ecs', 'cost-explorer'. Use action='list-actions' to discover the supported actions for a service."
    • addedInput schema / properties / service / enum
      Added value: +[
      +  "account",
      +  "alb",
      +  "apigateway",
      +  "backup",
      +  "bedrock",
      +  "cloudfront",
      +  "cloudwatchlogs",
      +  "cognito",
      +  "cost-explorer",
      +  "dynamodb",
      +  "ebs",
      +  "ec2",
      +  "ecs",
      +  "eks",
      +  "elasticache",
      +  "kms",
      +  "lambda",
      +  "msk",
      +  "opensearch",
      +  "rds",
      +  "s3",
      +  "secretsmanager",
      +  "sqs",
      +  "vpc",
      +  "waf"
      +]
    • addedInput schema / properties / session_id / description
      Added value: +"Session ID from convoopen — pass back EXACTLY as returned, including the ?token=... suffix (format: sess_v2_*?token=*). The suffix is part of the session credential; never strip it when summarizing. The session must have an AWS deploy attempt before inspect probes will succeed."
    • addedInput schema / properties / session_id / pattern
      Added value: +"^sess_v2_[0-9A-Za-z]+\\?token=[0-9a-f]+$"
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/openWorldHint, but the description adds real substance beyond them: it fetches temporary read-only credentials and hits the AWS API directly, describes the three response tiers and their token cost, and discloses that metrics discovery needs no credentials while billing actions need ce:GetCostAndUsage/ce:GetCostForecast IAM permissions.

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?

Front-loaded with the prerequisite and purpose, and the header-based sections (RESPONSE TIERS, REQUIRES, METRICS, BILLING, EXAMPLES) make it scannable despite its length. Slightly redundant: the purpose is restated three times across the opening lines and the 'Use this tool when...' sentence.

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?

For a 6-param, multi-service inspection tool with an output schema, this covers everything an agent needs: gating prerequisite, credential/session format (sess_v2_...?token=...), the full service enum rationale, metric and billing sub-flows, and worked examples. Return values need not be explained since an output schema exists.

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%, so the baseline is 3, but the description genuinely enriches it with concrete filter JSON ('{"hours":6,"period":300}', '{"days":7,"granularity":"DAILY"}'), action discovery via action='list-actions', and the coupling of detail/raw to response tiers. Minor gap: it says detail/raw may be omitted while the schema lists them as required.

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 and resource ('Inspect AWS infrastructure / deployed AWS resources') and immediately narrows scope to resources created by a deployment attempt. An agent can distinguish it from convoinspect, gcpinspect, and the tf* family without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit prerequisite ('requires a prior deployment ATTEMPT', check convostatus for hasDeployAttempt=true), explicit trigger ('when the user asks about the status or details of their deployed infrastructure'), and an explicit edge case ('works even after failed deploys to inspect orphaned resources'). It also names the sibling (convostatus) that gates this call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources