Skip to main content
Glama
francisco-perez-sorrosal

LinkedIn MCP Server

get_url_for_jobs_search

Generate an encoded URL for job searches on LinkedIn, compatible with the platform's API. Input specific job queries to retrieve tailored search links for efficient job hunting.

Instructions

Generates a properly encoded URL that can be used to search for jobs on LinkedIn.
The generated URL is compatible with LinkedIn's job search API.

Args:
    query: The search query string for jobs in LinkedIn.
           
Returns:
    str: A properly encoded URL to search for jobs on LinkedIn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoLooking for Research Enginer/Machine Learning/AI Engineer jobs in San Francisco

Implementation Reference

  • The handler function for the 'get_url_for_jobs_search' tool. It is registered via the @mcp.tool() decorator. Validates the distance parameter and delegates URL composition to the helper function.
    @mcp.tool()
    def get_url_for_jobs_search(location: str = "San Francisco", distance: int = 25, query: str = "AI Research Engineer") -> str:
        """
        Generates a properly encoded URL that can be used to search for jobs on LinkedIn.
        The generated URL is compatible with LinkedIn's job search API.
        
        Args:
            location: The location to search for jobs in LinkedIn (required)
            distance: The distance from the location to search for jobs in LinkedIn (10, 25, 35, 50, 75, 100)
            query: The search query string for jobs in LinkedIn (required)
                   
        Returns:
            str: A properly encoded URL to search for jobs on LinkedIn.
        """
        if not isinstance(distance, int) or distance not in [10, 25, 35, 50, 75, 100]:
            logger.warning(f"Invalid distance {distance}, using default 25")
            distance = 25
            
        logger.info(f"Generating job search URL for location: {location}, distance: {distance}, query: {query}")
        return compose_job_search_url(location, distance, query)
  • Supporting utility function that encodes the parameters and constructs the LinkedIn job search URL. Called by the handler.
    @mcp.resource("linkedinmcpfps://job_search_query/{location}/{distance}/{query}")
    def compose_job_search_url(location: str="San Francisco", distance: int=25, query: str="AI Research Engineer") -> str:
        """
        Composes the URL to search for jobs in LinkedIn with proper URI encoding.
        
        Args:
            location: The location to search for jobs in LinkedIn
            distance: The distance from the location to search for jobs in LinkedIn
            query: The search query string for jobs in LinkedIn
            
        Returns:
            str: Properly encoded URL string with a placeholder for the start index.
        """
        encoded_location = quote_plus(location)
        encoded_distance = quote_plus(str(distance))
        encoded_query = quote_plus(query)
        logger.info(f"Encoded query: {encoded_query}")
        # The double curly braces are escaped to produce a single curly brace for later formatting of the start index
        return f"https://www.linkedin.com/jobs-guest/jobs/api/seeMoreJobPostings/search-results/?location={encoded_location}&distance={encoded_distance}&keywords={encoded_query}"
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adequately describes the core behavior (URL generation for LinkedIn job search) and mentions compatibility with LinkedIn's API, but lacks details about rate limits, authentication requirements, error handling, or what makes the URL 'properly encoded' beyond basic encoding. It doesn't contradict any 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 appropriately sized and well-structured with three focused sentences: purpose statement, parameter explanation, and return value. Each sentence earns its place by providing distinct information without redundancy. The Args/Returns formatting enhances clarity without unnecessary verbosity.

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 the tool's moderate complexity (single parameter, no annotations, no output schema), the description is mostly complete. It covers purpose, parameter meaning, and return type adequately. However, it could benefit from more behavioral context (e.g., encoding specifics, error cases) since there are no annotations or output schema to fill those gaps.

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?

With 0% schema description coverage and only one parameter, the description adds significant value beyond the input schema. It clearly explains the 'query' parameter as 'The search query string for jobs in LinkedIn,' providing essential semantic context that the schema's title ('Query') and default value alone don't convey. This fully compensates for the schema's lack of description.

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 tool's purpose with specific verbs ('Generates a properly encoded URL') and resource ('to search for jobs on LinkedIn'), distinguishing it from sibling tools like get_jobs_raw_metadata or get_new_job_ids which handle different aspects of job data. It explicitly mentions compatibility with LinkedIn's job search API, providing clear differentiation.

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 provides clear context for when to use this tool ('to search for jobs on LinkedIn'), but does not explicitly state when not to use it or name alternatives. It implies usage for URL generation rather than direct job fetching, but lacks explicit exclusions or comparisons to sibling tools like get_jobs_raw_metadata.

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

Related 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/francisco-perez-sorrosal/linkedin-mcp'

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