Skip to main content
Glama

Batch-Inspect GCP Infrastructure

gcpinspect_batch
Read-only

BATCH INSPECTION: run up to 32 GCP inspect probes in one call. ⚠️ PREREQUISITE: Same as gcpinspect — deploy attempt required. Check convostatus for hasDeployAttempt=true before calling.

Use this when you need to check more than ~3 resources. The backend fetches Oracle credentials ONCE per batch and fans out probes against a single GCP credentials blob — a 12-resource health check is ~5–8× faster and 12× fewer Oracle round-trips than calling gcpinspect 12 times.

BUDGETS:

  • Up to 32 sub-probes per call (subs array length).

  • 30s per-sub timeout; 60s total batch wall-clock.

  • Concurrency cap 8.

  • 512 KB response cap: subs past the cap keep their envelope (index/service/action/ok) but have result replaced with truncated=true.

PARTIAL FAILURE IS EXPECTED. The response is an ordered results array; each entry has {index, service, action, ok, result, error}. Inspect each result — do NOT abort on the first error. A credential fetch failure leaves cred-less probes (list-actions, list-metrics) succeeding anyway.

REQUIRES: session_id from convoopen response (format: sess_v2_...). Supported services: apigateway, bastion, billing, certificatemanager, cloudarmor, cloudbuild, cloudcdn, clouddeploy, clouddns, cloudfunctions, cloudkms, cloudlogging, cloudmonitoring, cloudrun, cloudsql, compute, firestore, gcs, gke, iam, identityplatform, loadbalancer, memorystore, pubsub, secretmanager, vertexai, vpc For a specific service's actions, use gcpinspect (singular) with action="list-actions" — batch is not the place for discovery. Batch responses are always summarized (no detail/raw per-sub); use singular gcpinspect when you need full metadata or raw API output for one resource.

EXAMPLES:

  • gcpinspect_batch(session_id=..., subs=[ {"service":"compute","action":"list-instances"}, {"service":"gke","action":"list-clusters"}, {"service":"cloudsql","action":"list-instances"}])

  • gcpinspect_batch(session_id=..., subs=[ {"service":"compute","action":"get-metrics","filters":"{"hours":6}"}, {"service":"cloudrun","action":"get-metrics","filters":"{"hours":6}"}])

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>",
      "subs": "<subs>"
    },
    "name": "gcpinspect_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
subsYesUp to 32 sub-probes, each with {service, action, filters?, detail?, raw?}. The backend fetches credentials once per batch and fans out probes in parallel (concurrency 8, 30s per-sub timeout, 60s total wall clock). Partial failure is expected — inspect each result.ok independently.
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 a GCP 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.
resultsNoOne entry per sub-request, in request order.
truncated_atNoIndex of the first sub-request whose result was dropped for size.
truncated_cap_bytesNoResponse size cap, in bytes, that caused the truncation.

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"
      +      ]
      +    },
      +    "results": {
      +      "description": "One entry per sub-request, in request order.",
      +      "items": {
      +        "description": "Result of one GCP sub-request.",
      +        "properties": {
      +          "action": {
      +            "description": "Action the sub-request ran.",
      +            "type": "string"
      +          },
      +          "duration_ms": {
      +            "description": "Time the sub-request took, in milliseconds.",
      +            "type": "integer"
      +          },
      +          "error": {
      +            "description": "Error message when ok is false.",
      +            "type": "string"
      +          },
      +          "index": {
      +            "description": "Position of the sub-request in the request.",
      +            "type": "integer"
      +          },
      +          "ok": {
      +            "description": "True when the sub-request succeeded.",
      +            "type": "boolean"
      +          },
      +          "result": {
      +            "description": "The sub-request result, with the same rules as the single inspect tool."
      +          },
      +          "service": {
      +            "description": "Service the sub-request inspected.",
      +            "type": "string"
      +          },
      +          "summarized": {
      +            "description": "True when result is a compact summary.",
      +            "type": "boolean"
      +          },
      +          "truncated": {
      +            "description": "True when result was dropped to keep the response under the size cap.",
      +            "type": "boolean"
      +          }
      +        },
      +        "type": [
      +          "null",
      +          "object"
      +        ]
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "truncated_at": {
      +      "description": "Index of the first sub-request whose result was dropped for size.",
      +      "type": "integer"
      +    },
      +    "truncated_cap_bytes": {
      +      "description": "Response size cap, in bytes, that caused the truncation.",
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / subs / items / properties / service / enum
      Previous value: -[
      -  "apigateway",
      -  "bastion",
      -  "billing",
      -  "cloudarmor",
      -  "cloudbuild",
      -  "cloudcdn",
      -  "cloudfunctions",
      -  "cloudkms",
      -  "cloudlogging",
      -  "cloudmonitoring",
      -  "cloudrun",
      -  "cloudsql",
      -  "compute",
      -  "firestore",
      -  "gcs",
      -  "gke",
      -  "identityplatform",
      -  "loadbalancer",
      -  "memorystore",
      -  "pubsub",
      -  "secretmanager",
      -  "vertexai",
      -  "vpc"
      -]New value: +[
      +  "apigateway",
      +  "bastion",
      +  "billing",
      +  "certificatemanager",
      +  "cloudarmor",
      +  "cloudbuild",
      +  "cloudcdn",
      +  "clouddeploy",
      +  "clouddns",
      +  "cloudfunctions",
      +  "cloudkms",
      +  "cloudlogging",
      +  "cloudmonitoring",
      +  "cloudrun",
      +  "cloudsql",
      +  "compute",
      +  "firestore",
      +  "gcs",
      +  "gke",
      +  "iam",
      +  "identityplatform",
      +  "loadbalancer",
      +  "memorystore",
      +  "pubsub",
      +  "secretmanager",
      +  "vertexai",
      +  "vpc"
      +]
  3. Changed9 schema fields changed
    • 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 a GCP 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]+$"
    • addedInput schema / properties / subs / description
      Added value: +"Up to 32 sub-probes, each with {service, action, filters?, detail?, raw?}. The backend fetches credentials once per batch and fans out probes in parallel (concurrency 8, 30s per-sub timeout, 60s total wall clock). Partial failure is expected — inspect each result.ok independently."
    • addedInput schema / properties / subs / items / properties / action / description
      Added value: +"Operation on the service (e.g. 'describe-instances', 'list-buckets', 'list-actions' for discovery, 'list-metrics' / 'get-metrics' for time-series)."
    • addedInput schema / properties / subs / items / properties / filters / description
      Added value: +"Optional JSON-encoded filter object passed through to the underlying API. Examples: '{\"hours\":6}' for metric windows, '{\"days\":7}' for cost queries."
    • addedInput schema / properties / subs / items / properties / service / description
      Added value: +"Cloud service to query (e.g. 'ec2', 'rds', 's3' for AWS; 'compute', 'storage', 'cloudsql' for GCP). Use the singular awsinspect/gcpinspect tool with action='list-actions' to discover supported services."
    • addedInput schema / properties / subs / items / properties / service / enum
      Added value: +[
      +  "apigateway",
      +  "bastion",
      +  "billing",
      +  "cloudarmor",
      +  "cloudbuild",
      +  "cloudcdn",
      +  "cloudfunctions",
      +  "cloudkms",
      +  "cloudlogging",
      +  "cloudmonitoring",
      +  "cloudrun",
      +  "cloudsql",
      +  "compute",
      +  "firestore",
      +  "gcs",
      +  "gke",
      +  "identityplatform",
      +  "loadbalancer",
      +  "memorystore",
      +  "pubsub",
      +  "secretmanager",
      +  "vertexai",
      +  "vpc"
      +]
    • addedInput schema / properties / subs / maxItems
      Added value: +32
    • addedInput schema / properties / subs / minItems
      Added value: +1
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description provides rich, non-obvious behavioral constraints, such as the prerequisite of a deploy attempt (`hasDeployAttempt=true`), the specific performance characteristics (fan out, single credential fetch), and the critical instruction that partial failure is expected and agents should not abort.

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?

Despite its length, the structure is highly effective. It front-loads prerequisites and core limitations (32 probes), then moves logically through performance, constraints, failure policies, and finally provides usage examples, making zero sentences feel wasted.

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?

Given the complexity of batch operations, failure handling, and performance characteristics, the definition is exceptionally complete. It details everything from concurrency caps to the specific truncation policy for large responses.

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?

Although schema coverage is 100%, the description adds vital semantic meaning. It specifies that the session_id must include the full `?token=...` suffix, and it provides practical examples of filter usage and clarifies the difference between action types (e.g., discovery vs. time-series metrics).

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 title and description clearly state the purpose: running up to 32 GCP inspect probes in a single batch call. It explicitly distinguishes itself from the singular tool, gcpinspect, by stating the batch is not suitable for discovery.

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?

The guidelines are exhaustive. It tells the agent exactly when to use the tool (when checking >~3 resources), and crucially, when *not* to use it, directing agents to gcpinspect for discovery or detailed raw output.

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