GCP MCP
by eniayomi
Verified
run-gcp-code
Run GCP code
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | Your 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. | |
projectId | No | GCP project ID to use | |
reasoning | Yes | The reasoning behind the code | |
region | No | Region to use (if not provided, us-central1 is used) |