get_job_details
Retrieve structured job posting details from LinkedIn using a job ID, including title, company, location, posting date, application count, and description.
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:32-57 (handler)The handler function that implements the core logic for the 'get_job_details' tool, using LinkedIn scraper to fetch job details by ID.@mcp.tool() 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:29-29 (registration)Registration of the job tools, including 'get_job_details', by calling register_job_tools on the MCP server instance.register_job_tools(mcp)
- linkedin_mcp_server/tools/job.py:24-24 (registration)The registration function that defines and registers the 'get_job_details' tool (and others) using @mcp.tool() decorators.def register_job_tools(mcp: FastMCP) -> None:
- Input/output schema defined in the docstring of the handler, describing parameters and return type for MCP tool schema generation.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) """