Skip to main content
Glama

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
NameRequiredDescriptionDefault
job_idYes

Implementation Reference

  • 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")
  • 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, )
  • Import of register_job_tools function required for tool registration.
    from linkedin_mcp_server.tools.job import register_job_tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stickerdaniel/linkedin-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server