Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

gcp_list_cloud_functions

Retrieve all Google Cloud Functions in a specified GCP project and region to manage serverless resources.

Instructions

List all Cloud Functions in GCP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoGCP project ID
regionNoGCP regionus-central1

Implementation Reference

  • Handler implementation for the 'gcp_list_cloud_functions' tool. It initializes the GCPAdapter and calls listCloudFunctions() on it, then formats the response.
    case 'gcp_list_cloud_functions': {
      const functions = await adapter.listCloudFunctions();
      return {
        total: functions.length,
        functions: functions.map((func) => ({
          id: func.id,
          name: func.functionName,
          runtime: func.runtime,
          region: func.region,
          status: func.status,
          availableMemoryMb: func.availableMemoryMb,
          timeout: func.timeout,
        })),
      };
    }
  • Schema definition for the 'gcp_list_cloud_functions' tool, including input parameters for projectId and region.
    {
      name: 'gcp_list_cloud_functions',
      description: 'List all Cloud Functions in GCP',
      inputSchema: {
        type: 'object',
        properties: {
          projectId: {
            type: 'string',
            description: 'GCP project ID',
          },
          region: {
            type: 'string',
            description: 'GCP region',
            default: 'us-central1',
          },
        },
      },
    },
  • src/server.ts:68-69 (registration)
    Registration and routing logic in the main MCP server: checks if tool name matches gcpTools and calls the corresponding handler.
    } else if (gcpTools.some((t) => t.name === name)) {
      result = await handleGCPTool(name, args || {});
  • Core helper method in GCPAdapter that implements the logic to list Cloud Functions. Currently a placeholder returning empty array, with comments for full implementation using @google-cloud/functions.
    async listCloudFunctions(): Promise<GCPCloudFunction[]> {
      await this.initializeClients();
      
      // Simplified implementation - would use Cloud Functions API in production
      // For now, return empty array as Cloud Functions client requires additional setup
      try {
        // In production, would use:
        // const { CloudFunctionsServiceClient } = await import('@google-cloud/functions');
        // this.functionsClient = new CloudFunctionsServiceClient();
        // const parent = `projects/${this.projectId}/locations/-`;
        // const [functionList] = await this.functionsClient.listFunctions({ parent });
        
        return [];
      } catch (error) {
        throw new Error(`Failed to list cloud functions: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the action without details on permissions, rate limits, pagination, or return format. It lacks critical context for safe and effective use, such as whether it lists all functions or requires specific access.

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, clear sentence with zero wasted words, making it highly efficient and front-loaded. It directly communicates the core purpose without unnecessary elaboration.

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

Completeness2/5

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

Given the tool's complexity (listing resources in GCP), lack of annotations, and no output schema, the description is insufficient. It omits behavioral traits, usage context, and output details, leaving significant gaps for an agent to operate effectively.

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 input schema fully documents both parameters. The description adds no additional meaning beyond implying a listing operation, which the schema already supports. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 verb ('List') and resource ('Cloud Functions in GCP'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'gcp_list_compute_instances' or 'gcp_list_storage_buckets' beyond specifying the resource type, missing explicit distinction.

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, such as other GCP listing tools or general 'list_resources'. There's no mention of prerequisites, context, or exclusions, leaving usage entirely implied.

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/code-alchemist01/Cloud-mcp_server'

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