Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

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,
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions 'accessible projects' (implying permission-based filtering) and 'optional filtering and pagination', it doesn't describe what 'accessible' means, what authentication is required, rate limits, error conditions, or what the return format looks like. For a list operation with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by parameter documentation. Both sentences earn their place - the first establishes core functionality, the second provides essential parameter details. It's appropriately sized for a list operation with three parameters, though the parameter documentation could be slightly more concise.

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 no annotations and no output schema, the description provides adequate but incomplete coverage. The parameter documentation is good, but there's no information about return format, error handling, or authentication requirements. For a list operation that presumably returns structured data, the lack of output information is a notable gap, though the core functionality is reasonably clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides explicit parameter documentation in the Args section, adding significant value beyond the schema which has 0% description coverage. It explains 'filters' as 'Optional JSON filter string', 'page' with default and meaning, and 'page_size' with default. This compensates well for the schema's lack of descriptions, though it doesn't provide examples of filter syntax or explain pagination behavior in detail.

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 ('List all accessible projects') and resource ('projects'), making the purpose immediately understandable. It distinguishes from siblings like 'get_project' by indicating it returns multiple items rather than a single one. However, it doesn't explicitly differentiate from 'list_work_packages' which might be confusing in this sibling context.

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. With multiple sibling tools like 'get_project' (single project) and 'list_work_packages' (different resource), there's no indication of when this list_projects tool is appropriate versus those other options. The description only states what it does, not when to choose it.

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

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