get_time_away
Retrieve a single time-away record by its unique ID to view details of an employee's absence.
Instructions
Retrieve a single time-away record by id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time_away_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- humaans_mcp/server.py:342-345 (handler)The actual tool handler for 'get_time_away'. It is decorated with @mcp.tool(), takes a time_away_id parameter, and calls the HumaansClient.get() method to retrieve a single time-away record by ID.
@mcp.tool() async def get_time_away(time_away_id: str) -> dict[str, Any]: """Retrieve a single time-away record by id.""" return await client().get(f"/time-away/{time_away_id}") - humaans_mcp/server.py:342-342 (registration)The @mcp.tool() decorator registers 'get_time_away' as a tool on the FastMCP instance named 'mcp' (line 7).
@mcp.tool() - humaans_mcp/server.py:343-343 (schema)The function signature defines the input schema: a required 'time_away_id' string parameter. The return type is dict[str, Any].
async def get_time_away(time_away_id: str) -> dict[str, Any]: - humaans_mcp/client.py:34-43 (helper)The HumaansClient.get() helper method is used by the handler to make the actual HTTP GET request to the Humaans API.
async def get(self, path: str, params: dict[str, Any] | None = None) -> Any: clean = {k: v for k, v in (params or {}).items() if v is not None} resp = await self._client.get(path, params=clean) if resp.status_code >= 400: try: body = resp.json() except Exception: body = resp.text raise HumaansError(resp.status_code, path, body) return resp.json()