Skip to main content
Glama

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 )

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