get_job_role
Retrieve a job role's details by its ID from Humaans HRIS.
Instructions
Retrieve a single job role by id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_role_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- humaans_mcp/server.py:269-272 (handler)The handler function for the 'get_job_role' tool. It accepts a job_role_id string, makes a GET request to the Humaans API endpoint /job-roles/{job_role_id}, and returns the response as a dictionary.
@mcp.tool() async def get_job_role(job_role_id: str) -> dict[str, Any]: """Retrieve a single job role by id.""" return await client().get(f"/job-roles/{job_role_id}") - humaans_mcp/server.py:269-272 (registration)The tool is registered via the @mcp.tool() decorator from FastMCP, which registers 'get_job_role' as an MCP tool.
@mcp.tool() async def get_job_role(job_role_id: str) -> dict[str, Any]: """Retrieve a single job role by id.""" return await client().get(f"/job-roles/{job_role_id}") - humaans_mcp/client.py:34-43 (helper)The get() helper method on HumaansClient 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()