Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

get_relation

Retrieve specific relation details in OpenProject to view task connections, dependencies, and inter-project relationships using a relation ID.

Instructions

Get details of a specific relation.

Args:
    relation_id: Relation ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relation_idYes

Implementation Reference

  • The MCP tool handler for 'get_relation'. It is registered via the @mcp.tool() decorator and delegates execution to the relations module's get_relation function.
    @mcp.tool()
    async def get_relation(relation_id: int):
        """Get details of a specific relation.
    
        Args:
            relation_id: Relation ID
        """
        return await relations.get_relation(relation_id=relation_id)
  • Core helper function implementing the logic to fetch a specific relation from the OpenProject API using the client.
    async def get_relation(relation_id: int) -> dict[str, Any]:
        """Get details of a specific relation.
    
        Args:
            relation_id: Relation ID
    
        Returns:
            Relation object with details
        """
        client = OpenProjectClient()
    
        try:
            result = await client.get(f"relations/{relation_id}")
            return result
        finally:
            await client.close()

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