get_job
Retrieve detailed information about a specific job by providing its unique identifier. This tool helps users access comprehensive job data from the HireBase Job API.
Instructions
Get detailed information about a specific job
Args:
job_id: The unique identifier of the job
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Implementation Reference
- src/server.py:200-207 (handler)The MCP tool handler for 'get_job', registered via @mcp.tool() decorator. It receives the job_id parameter and delegates execution to the internal _get_job_logic helper.@mcp.tool() def get_job(job_id: str) -> Dict[str, Any]: """Get detailed information about a specific job Args: job_id: The unique identifier of the job """ return _get_job_logic(job_id=job_id)
- src/server.py:185-198 (helper)Helper function implementing the core logic: makes HTTP GET request to HireBase API endpoint for the specific job_id, handles errors, and returns job details or error message.def _get_job_logic(job_id: str) -> Dict[str, Any]: """Internal logic for retrieving a specific job via HireBase API.""" try: response = requests.get( f"{HIREBASE_API_BASE}/jobs/{job_id}", headers=get_hirebase_headers() ) response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: # Log the error or handle it as needed # print(f"HireBase API Error: {e}") # Example logging return {"error": str(e)}
- src/server.py:16-21 (helper)Utility helper to generate headers for HireBase API requests, including optional API key.def get_hirebase_headers(): """Get headers for HireBase API requests""" headers = {"Content-Type": "application/json"} if HIREBASE_API_KEY: headers["x-api-key"] = HIREBASE_API_KEY return headers