get_job_details
Retrieve structured job posting data from LinkedIn using a job ID to access title, company, location, posting date, and description details.
Instructions
Get job details for a specific job posting on LinkedIn
Args: job_id (str): LinkedIn job ID (e.g., "4252026496", "3856789012")
Returns: Dict[str, Any]: Structured job data including title, company, location, posting date, application count, and job description (may be empty if content is protected)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Implementation Reference
- linkedin_mcp_server/tools/job.py:33-65 (handler)Complete handler implementation for the 'get_job_details' tool, registered via @mcp.tool decorator. Scrapes LinkedIn job details using the linkedin_scraper library and returns structured data as a dictionary.@mcp.tool( annotations=ToolAnnotations( title="Get Job Details", readOnlyHint=True, destructiveHint=False, openWorldHint=True, ) ) async def get_job_details(job_id: str) -> Dict[str, Any]: """ Get job details for a specific job posting on LinkedIn Args: job_id (str): LinkedIn job ID (e.g., "4252026496", "3856789012") Returns: Dict[str, Any]: Structured job data including title, company, location, posting date, application count, and job description (may be empty if content is protected) """ try: # Construct clean LinkedIn URL from job ID job_url = f"https://www.linkedin.com/jobs/view/{job_id}/" driver = safe_get_driver() logger.info(f"Scraping job: {job_url}") job = Job(job_url, driver=driver, close_on_complete=False) # Convert job object to a dictionary return job.to_dict() except Exception as e: return handle_tool_error(e, "get_job_details")
- linkedin_mcp_server/server.py:27-30 (registration)Registration block in the MCP server creation where register_job_tools is called to register the job tools, including 'get_job_details'.# Register all tools register_person_tools(mcp) register_company_tools(mcp) register_job_tools(mcp)
- ToolAnnotations providing schema metadata, hints, and title for the 'get_job_details' tool.title="Get Job Details", readOnlyHint=True, destructiveHint=False, openWorldHint=True, )
- linkedin_mcp_server/server.py:17-17 (registration)Import of register_job_tools function required for tool registration.from linkedin_mcp_server.tools.job import register_job_tools