Skip to main content
Glama

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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")
  • Registration of the job tools, including 'get_job_details', by calling register_job_tools on the MCP server instance.
    register_job_tools(mcp)
  • 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)
    """
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that job descriptions 'may be empty if content is protected', which is valuable behavioral context. However, it doesn't mention authentication requirements, rate limits, error conditions, or data freshness - leaving gaps for a read operation.

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?

Perfectly structured with clear sections: purpose statement, Args with detailed parameter explanation, and Returns with comprehensive output description. Every sentence adds value with zero redundancy. The information is front-loaded and efficiently organized.

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

Completeness4/5

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

Given 1 parameter with 0% schema coverage and an output schema exists, the description does excellent work explaining both input and output semantics. However, for a LinkedIn API tool with no annotations, it could better address authentication, rate limits, or common error scenarios to be fully complete.

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

Parameters5/5

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

The schema has 0% description coverage, so the description must compensate fully. It provides excellent parameter semantics: defines job_id as 'LinkedIn job ID' with concrete examples ('4252026496', '3856789012'), clarifying format and purpose beyond the bare schema.

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'), target resource ('for a specific job posting on LinkedIn'), and distinguishes it from siblings like get_recommended_jobs (list) and search_jobs (search). The verb+resource combination is precise and unambiguous.

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 context by specifying 'for a specific job posting' and listing sibling tools, but doesn't explicitly state when to use this vs. alternatives like search_jobs. It provides clear scope but lacks explicit comparison or exclusion guidance.

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/Logos-Parthenos-AI/linkedin-mcp-server'

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