Skip to main content
Glama

select-project

Select a Google Cloud Platform project to manage resources like Compute Engine, Cloud Storage, and BigQuery for subsequent operations.

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

  • The main handler logic for executing the 'select-project' tool. It validates input using Zod schema, initializes credentials, sets the selected project ID and region, and returns a 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!");
  • index.ts:107-124 (registration)
    Registration of the 'select-project' tool in the ListTools response, defining its name, description, and JSON input schema.
    {
      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"],
      },
    },
  • Zod runtime validation schema for the 'select-project' tool inputs, used in the handler for parsing arguments.
    const SelectProjectSchema = z.object({
      projectId: z.string(),
      region: z.string().optional(),
    });
  • Helper function for selecting a project with authentication initialization and error handling, similar to handler logic but not directly invoked by the tool.
    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;
      }
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool selects a project for subsequent interactions, implying state change or context setting, but doesn't disclose behavioral traits like whether this affects all following tools, if it's reversible, requires specific permissions, or has side effects. For a tool that likely modifies session state, this is a significant gap in transparency.

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?

The description is a single, efficient sentence that front-loads the core purpose ('Selects GCP project') and adds necessary context ('to use for subsequent interactions'). There is zero waste, and every word earns its place, making it appropriately sized for the tool's function.

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

Completeness3/5

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

Given the tool's moderate complexity (state-changing with 2 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavior, side effects, or return values. For a tool that sets context, more completeness on how it interacts with other tools would be beneficial, but it meets the minimum viable threshold.

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%, with clear descriptions for both parameters (projectId and region). The description doesn't add any meaning beyond the schema, such as explaining the impact of region selection or projectId format. With high schema coverage, the baseline is 3, as the schema does the heavy lifting without extra value from the description.

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

Purpose4/5

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

The description clearly states the action ('selects') and resource ('GCP project'), and specifies the purpose ('to use for subsequent interactions'). It distinguishes from siblings like 'list-projects' (which enumerates) and 'run-gcp-code' (which executes). However, it doesn't explicitly contrast with all siblings, such as 'get-billing-info' or 'list-gke-clusters', which operate on different resources.

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

Usage Guidelines3/5

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

The description implies usage by stating 'for subsequent interactions', suggesting this tool sets context for other operations. It doesn't provide explicit when-to-use guidance, alternatives (e.g., when to use 'list-projects' first), or exclusions (e.g., not needed if project is already selected). The context is clear but lacks detailed guidance.

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

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