Skip to main content
Glama

select-project

Specify a Google Cloud Platform project and region for managing and querying GCP resources like Compute Engine, Cloud Storage, and BigQuery.

Instructions

Selects GCP project to use for subsequent interactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the GCP project to select
regionNoRegion to use (if not provided, us-central1 is used)

Implementation Reference

  • Handler logic for the 'select-project' tool. Parses input, sets selectedProject, selectedRegion, and selectedProjectCredentials using GoogleAuth, returns success message.
    } else if (name === "select-project") { const { projectId, region } = SelectProjectSchema.parse(args); selectedProjectCredentials = await auth.getClient(); selectedProject = projectId; selectedRegion = region || "us-central1"; return createTextResponse("Project selected successfully!");
  • Zod schema for validating 'select-project' tool inputs.
    const SelectProjectSchema = z.object({ projectId: z.string(), region: z.string().optional(), });
  • index.ts:107-124 (registration)
    Registration of 'select-project' tool in the listTools response, including input schema definition.
    { name: "select-project", description: "Selects GCP project to use for subsequent interactions", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "ID of the GCP project to select", }, region: { type: "string", description: "Region to use (if not provided, us-central1 is used)", }, }, required: ["projectId"], }, },
  • Helper function 'selectProject' for selecting project with error handling (not directly used by tool handler).
    const selectProject = async (projectId: string, region?: string) => { try { selectedProject = projectId; selectedRegion = region || "us-central1"; selectedProjectCredentials = await initializeAuth(); return true; } catch (error) { console.error('Failed to select project:', error); selectedProject = null; selectedProjectCredentials = null; throw error; } };

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

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