Skip to main content
Glama

Get Job Details

get_job_details
Read-only

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true, destructiveHint=false, and openWorldHint=true, covering safety and scope. The description adds useful context about potential empty job descriptions due to protected content, but doesn't detail rate limits, authentication needs, or pagination behavior, providing moderate value beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured Args and Returns sections. Every sentence adds value: the first states the action, Args clarifies the parameter, and Returns outlines the output, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple single-parameter input, rich annotations, and presence of an output schema (which handles return values), the description is complete. It covers purpose, parameter semantics, and output overview, leaving no gaps for this tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining the job_id parameter's purpose and providing examples (e.g., '4252026496'), adding essential meaning beyond the bare schema. However, it doesn't specify format constraints like length or validation rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get job details') and resource ('for a specific job posting on LinkedIn'), distinguishing it from siblings like get_recommended_jobs or search_jobs by focusing on individual job retrieval rather than lists or searches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a specific job ID is known, contrasting with search_jobs for finding jobs. However, it lacks explicit guidance on when not to use it (e.g., for company or person profiles) or named alternatives, keeping it clear but not fully explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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