Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

get_work_package_schema

Retrieve the schema for creating or updating work packages in OpenProject, specifying required fields and structure based on project and optional work type.

Instructions

Get the schema for creating/updating work packages.

Args:
    project_id: Project identifier or ID
    type_id: Optional type ID to get type-specific schema

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
type_idNo

Implementation Reference

  • Core handler function that retrieves the work package schema from the OpenProject API for a given project, optionally filtered by work package type ID. It constructs the API request with filters if type_id is provided and returns the schema object.
    async def get_work_package_schema(
        project_id: str, type_id: int | None = None
    ) -> dict[str, Any]:
        """Get the schema for creating/updating work packages.
    
        This returns available fields, required fields, and allowed values
        for a work package in a specific project.
    
        Args:
            project_id: Project identifier or ID
            type_id: Optional type ID to get type-specific schema
    
        Returns:
            Schema object with available fields and constraints
        """
        client = OpenProjectClient()
    
        try:
            params = {}
            if type_id:
                params["filters"] = f'[{{"type":{{"operator":"=","values":["{type_id}"]}}}}]'
    
            result = await client.get(
                f"projects/{project_id}/work_packages/schema", params=params
            )
            return result
        finally:
            await client.close()
  • MCP tool registration using @mcp.tool() decorator. This wrapper function defines the tool interface and delegates execution to the implementation in work_packages.get_work_package_schema.
    @mcp.tool()
    async def get_work_package_schema(project_id: str, type_id: int | None = None):
        """Get the schema for creating/updating work packages.
    
        Args:
            project_id: Project identifier or ID
            type_id: Optional type ID to get type-specific schema
        """
        return await work_packages.get_work_package_schema(
            project_id=project_id, type_id=type_id
        )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a schema but doesn't describe what the schema contains, format (e.g., JSON structure), error conditions, authentication needs, or rate limits. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by a brief Args section. There's no wasted text, and the structure helps the agent quickly grasp key information. However, the Args section could be integrated more seamlessly, slightly affecting flow.

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 complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the schema output looks like, potential errors, or how type_id affects results. For a tool that likely returns structured data critical for other operations (e.g., create_work_package), more context is needed to use it 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?

The description adds minimal semantics beyond the input schema: it explains that project_id is a 'Project identifier or ID' and type_id is 'Optional type ID to get type-specific schema.' With 0% schema description coverage, this partially compensates by clarifying parameter roles, but it doesn't provide format details (e.g., string format for project_id) or examples. The baseline is low due to poor schema coverage, so a 3 reflects marginal improvement.

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 tool's purpose: 'Get the schema for creating/updating work packages.' It specifies the verb ('Get') and resource ('schema'), and distinguishes it from sibling tools like create_work_package or update_work_package by focusing on schema retrieval rather than data manipulation. However, it doesn't explicitly differentiate from other schema-related tools (none exist in siblings), so it's not a perfect 5.

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. It doesn't mention prerequisites (e.g., needing a valid project_id), scenarios where it's useful (e.g., before creating a work package), or exclusions. The agent must infer usage from the purpose alone, which is insufficient for optimal tool selection.

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