Skip to main content
Glama

Get Person Profile

get_person_profile
Read-only

Retrieve structured LinkedIn profile data for a specific person by providing their username to access professional information.

Instructions

Get a specific person's LinkedIn profile.

Args: linkedin_username (str): LinkedIn username (e.g., "stickerdaniel", "anistji")

Returns: Dict[str, Any]: Structured data from the person's profile

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedin_usernameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: constructs LinkedIn profile URL from username, scrapes data using linkedin_scraper.Person, transforms nested objects (experiences, educations, etc.) into structured dictionaries, and returns comprehensive profile information with error handling.
    async def get_person_profile(linkedin_username: str) -> Dict[str, Any]:
        """
        Get a specific person's LinkedIn profile.
    
        Args:
            linkedin_username (str): LinkedIn username (e.g., "stickerdaniel", "anistji")
    
        Returns:
            Dict[str, Any]: Structured data from the person's profile
        """
        try:
            # Construct clean LinkedIn URL from username
            linkedin_url = f"https://www.linkedin.com/in/{linkedin_username}/"
    
            driver = safe_get_driver()
    
            logger.info(f"Scraping profile: {linkedin_url}")
            person = Person(linkedin_url, driver=driver, close_on_complete=False)
    
            # Convert experiences to structured dictionaries
            experiences: List[Dict[str, Any]] = [
                {
                    "position_title": exp.position_title,
                    "company": exp.institution_name,
                    "from_date": exp.from_date,
                    "to_date": exp.to_date,
                    "duration": exp.duration,
                    "location": exp.location,
                    "description": exp.description,
                }
                for exp in person.experiences
            ]
    
            # Convert educations to structured dictionaries
            educations: List[Dict[str, Any]] = [
                {
                    "institution": edu.institution_name,
                    "degree": edu.degree,
                    "from_date": edu.from_date,
                    "to_date": edu.to_date,
                    "description": edu.description,
                }
                for edu in person.educations
            ]
    
            # Convert interests to list of titles
            interests: List[str] = [interest.title for interest in person.interests]
    
            # Convert accomplishments to structured dictionaries
            accomplishments: List[Dict[str, str]] = [
                {"category": acc.category, "title": acc.title}
                for acc in person.accomplishments
            ]
    
            # Convert contacts to structured dictionaries
            contacts: List[Dict[str, str]] = [
                {
                    "name": contact.name,
                    "occupation": contact.occupation,
                    "url": contact.url,
                }
                for contact in person.contacts
            ]
    
            # Return the complete profile data
            return {
                "name": person.name,
                "about": person.about,
                "experiences": experiences,
                "educations": educations,
                "interests": interests,
                "accomplishments": accomplishments,
                "contacts": contacts,
                "company": person.company,
                "job_title": person.job_title,
                "open_to_work": getattr(person, "open_to_work", False),
            }
        except Exception as e:
            return handle_tool_error(e, "get_person_profile")
  • The @mcp.tool decorator within register_person_tools registers the get_person_profile handler with metadata annotations defining the tool's title and hints.
    @mcp.tool(
        annotations=ToolAnnotations(
            title="Get Person Profile",
            readOnlyHint=True,
            destructiveHint=False,
            openWorldHint=True,
        )
    )
  • Top-level registration call to register_person_tools(mcp) in the create_mcp_server function, which defines and registers the get_person_profile tool.
    # Register all tools
    register_person_tools(mcp)
    register_company_tools(mcp)
    register_job_tools(mcp)
  • Function signature defining input schema (linkedin_username: str) and output type (Dict[str, Any]).
    async def get_person_profile(linkedin_username: str) -> Dict[str, Any]:
  • Lists 'get_person_profile' as a required tool in the generated Claude Desktop configuration.
    "requiredTools": [
        "get_person_profile",
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and openWorldHint=true, covering safety and data scope. The description adds valuable context by specifying it returns 'structured data from the person's profile', which helps understand the output format. No contradictions with annotations exist, and the description complements them with useful behavioral information about the return type.

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 efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence adds value: the first states what the tool does, the second explains the parameter with examples, and the third describes the return format. No wasted words, and information is front-loaded appropriately.

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 has annotations covering safety (readOnly, non-destructive) and scope (openWorld), plus an output schema exists (so return values don't need explanation), the description is reasonably complete. It covers the purpose, parameter semantics with examples, and output type. For a simple read operation with good annotations, only minor gaps like error handling or rate limits remain.

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

Parameters3/5

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

Schema description coverage is 0%, but the description provides the parameter name 'linkedin_username' and an example format ('stickerdaniel', 'anistji'), adding meaningful semantics beyond the bare schema. However, it doesn't fully compensate for the 0% coverage by explaining constraints or validation rules. With only 1 parameter, the baseline is higher, but more detail would improve this.

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

Purpose4/5

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

The description clearly states the verb 'Get' and resource 'specific person's LinkedIn profile', making the purpose immediately understandable. It distinguishes from siblings like get_company_profile by specifying person profiles, though it doesn't explicitly contrast with all siblings like search_jobs. The description goes beyond just restating the name/title by specifying the LinkedIn context.

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

Usage Guidelines3/5

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

The description implies usage when you need a specific person's LinkedIn profile, but doesn't provide explicit guidance on when to use this versus alternatives like search_jobs or get_company_profile. No when-not-to-use scenarios or prerequisites are mentioned. The context is clear but lacks comparative guidance with sibling tools.

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