Skip to main content
Glama

list_projects

Retrieve all projects accessible to the authenticated user, including project IDs and names, for managing and monitoring within the Coroot observability platform.

Instructions

List all accessible projects.

Returns a list of all projects that the authenticated user has access to. Each project includes its ID and name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'list_projects', decorated with @mcp.tool(). This is the entry point executed when the tool is called.
    @mcp.tool() async def list_projects() -> dict[str, Any]: """List all accessible projects. Returns a list of all projects that the authenticated user has access to. Each project includes its ID and name. """ return await list_projects_impl() # type: ignore[no-any-return]
  • The core implementation logic for the list_projects tool, which fetches projects using CorootClient and formats the response with success status and count.
    @handle_errors async def list_projects_impl() -> dict[str, Any]: """List all accessible projects.""" projects = await get_client().list_projects() return { "success": True, "count": len(projects), "projects": projects, }
  • Helper method in CorootClient that implements the actual API call to retrieve projects from the Coroot server's /api/user endpoint.
    async def list_projects(self) -> list[dict[str, Any]]: """List all accessible projects. Returns: List of project dictionaries. """ # Get user info which includes projects list user_response = await self._request("GET", "/api/user") user_data: dict[str, Any] = user_response.json() projects: list[dict[str, Any]] = user_data.get("projects", []) return projects

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/jamesbrink/mcp-coroot'

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