Skip to main content
Glama

run-gcp-code

Write and run TypeScript code using Google Cloud Client Libraries to query GCP resources and return minimal JSON data.

Instructions

Run GCP code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesYour job is to answer questions about GCP environment by writing Javascript/TypeScript code using Google Cloud Client Libraries. The code must adhere to a few rules: - Must use promises and async/await - Think step-by-step before writing the code, approach it logically - Must be written in TypeScript using official Google Cloud client libraries - Avoid hardcoded values like project IDs - Code written should be as parallel as possible enabling the fastest and most optimal execution - Code should handle errors gracefully, especially when doing multiple API calls - Each error should be handled and logged with a reason, script should continue to run despite errors - Data returned from GCP APIs must be returned as JSON containing only the minimal amount of data needed to answer the question - All extra data must be filtered out - Code MUST "return" a value: string, number, boolean or JSON object - If code does not return anything, it will be considered as FAILED - Whenever tool/function call fails, retry it 3 times before giving up - When listing resources, ensure pagination is handled correctly - Do not include any comments in the code - Try to write code that returns as few data as possible to answer without any additional processing required Be concise, professional and to the point. Do not give generic advice, always reply with detailed & contextual data sourced from the current GCP environment.
regionNoRegion to use (if not provided, us-central1 is used)
projectIdNoGCP project ID to use
reasoningYesThe reasoning behind the code
Behavior1/5

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

No annotations are provided, and the description gives no information about side effects, execution context, permissions, or whether the tool is read-only or destructive. The code parameter has detailed rules, but these are about writing code, not the tool's behavior. This leaves a significant transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise but severely under-specified. It does not earn its place because it fails to convey the tool's purpose or usage. The lack of structure and detail makes it insufficient for an AI agent.

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

Completeness1/5

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

The tool has 4 parameters (2 required), no output schema, and no annotations. The description is only 'Run GCP code', providing no context about return values, error handling, execution environment, or how the code output is used. This is completely inadequate for proper tool selection and invocation.

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 100%, so the baseline is 3. The tool description itself adds no extra meaning to the parameters—it merely states 'Run GCP code'. The schema already describes each parameter in detail, so the description does not compensate beyond the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Run GCP code' is extremely vague; it does not specify what the tool does with the code, what environment executes it, or how it differs from sibling tools that retrieve specific GCP information. A clear verb and resource are missing, making it ambiguous for an AI agent.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. Sibling tools like get-billing-info or list-projects are for specific queries, but no comparison or exclusions are given. The agent is left without context for appropriate invocation.

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/eniayomi/gcp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server