Skip to main content
Glama

list_projects

Retrieve and filter accessible OpenProject projects with pagination controls to manage project visibility and organization.

Instructions

List all accessible projects with optional filtering and pagination.

Args: filters: Optional JSON filter string page: Page number (default: 1) page_size: Items per page (default: 20)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo
pageNo
page_sizeNo

Implementation Reference

  • Core implementation of the list_projects tool handler. Fetches paginated list of projects from OpenProject API with optional filters using OpenProjectClient.
    async def list_projects( filters: str | None = None, page: int = 1, page_size: int = 20 ) -> dict[str, Any]: """List all accessible projects with optional filtering and pagination. Args: filters: Optional JSON filter string (e.g., '[{"active":{"operator":"=","values":["t"]}}]') page: Page number (default: 1) page_size: Items per page (default: 20) Returns: Paginated collection of projects with metadata """ client = OpenProjectClient() try: params: dict[str, Any] = { "pageSize": page_size, "offset": (page - 1) * page_size, } if filters: params["filters"] = filters result = await client.get("projects", params=params) return result finally: await client.close()
  • Registration of the list_projects tool using @mcp.tool() decorator in the main server, delegating to the projects module's implementation.
    @mcp.tool() async def list_projects( filters: str | None = None, page: int = 1, page_size: int = 20 ): """List all accessible projects with optional filtering and pagination. Args: filters: Optional JSON filter string page: Page number (default: 1) page_size: Items per page (default: 20) """ return await projects.list_projects( filters=filters, page=page, page_size=page_size, )

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/dev-in-black/openproject-mcp'

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