Skip to main content
Glama

GCP MCP

by RadiumGu

run-gcp-code

Execute JavaScript/TypeScript code in the Google Cloud Platform environment using official Google Cloud client libraries. Automates GCP tasks, handles API errors, and optimizes resource management across projects and regions.

Instructions

Run GCP code

Input 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.
projectIdNoGCP project ID to use
reasoningYesThe reasoning behind the code
regionNoRegion to use (if not provided, us-central1 is used)

Input Schema (JSON Schema)

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

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

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