Skip to main content
Glama

list-projects

Retrieve all Google Cloud Platform projects available with your current authentication credentials to manage and access GCP resources.

Instructions

List all GCP projects accessible with current credentials

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.ts:98-106 (registration)
    Registers the 'list-projects' tool with its description and empty input schema in the listTools response.
    { name: "list-projects", description: "List all GCP projects accessible with current credentials", inputSchema: { type: "object", properties: {}, required: [], }, },
  • Executes the 'list-projects' tool by calling listAvailableProjects() and formatting the response.
    } else if (name === "list-projects") { const projects = await listAvailableProjects(); return createTextResponse(JSON.stringify({ projects }));
  • Core logic to list accessible GCP projects using ProjectsClient.searchProjects(), with error handling.
    async function listAvailableProjects(): Promise<string[]> { const projectsClient = new ProjectsClient(); try { const [projects] = await projectsClient.searchProjects(); return projects.map((p: any) => JSON.stringify(p)); } catch (error) { console.error('Error listing projects:', error); return []; } }

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