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
| Name | Required | Description | Default |
|---|---|---|---|
| relation_id | Yes |
Implementation Reference
- src/openproject_mcp/server.py:354-361 (handler)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()