Skip to main content
Glama

Get Company Profile

get_company_profile
Read-only

Retrieve structured LinkedIn company profile data, including optional employee information, by specifying a company name.

Instructions

Get a specific company's LinkedIn profile.

Args: company_name (str): LinkedIn company name (e.g., "docker", "anthropic", "microsoft") get_employees (bool): Whether to scrape the company's employees (slower)

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_nameYes
get_employeesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that scrapes the LinkedIn company profile using the linkedin_scraper.Company class, constructs the profile data dictionary, and optionally includes employee data.
    async def get_company_profile(
        company_name: str, get_employees: bool = False
    ) -> Dict[str, Any]:
        """
        Get a specific company's LinkedIn profile.
    
        Args:
            company_name (str): LinkedIn company name (e.g., "docker", "anthropic", "microsoft")
            get_employees (bool): Whether to scrape the company's employees (slower)
    
        Returns:
            Dict[str, Any]: Structured data from the company's profile
        """
        try:
            # Construct clean LinkedIn URL from company name
            linkedin_url = f"https://www.linkedin.com/company/{company_name}/"
    
            driver = safe_get_driver()
    
            logger.info(f"Scraping company: {linkedin_url}")
            if get_employees:
                logger.info("Fetching employees may take a while...")
    
            company = Company(
                linkedin_url,
                driver=driver,
                get_employees=get_employees,
                close_on_complete=False,
            )
    
            # Convert showcase pages to structured dictionaries
            showcase_pages: List[Dict[str, Any]] = [
                {
                    "name": page.name,
                    "linkedin_url": page.linkedin_url,
                    "followers": page.followers,
                }
                for page in company.showcase_pages
            ]
    
            # Convert affiliated companies to structured dictionaries
            affiliated_companies: List[Dict[str, Any]] = [
                {
                    "name": affiliated.name,
                    "linkedin_url": affiliated.linkedin_url,
                    "followers": affiliated.followers,
                }
                for affiliated in company.affiliated_companies
            ]
    
            # Build the result dictionary
            result: Dict[str, Any] = {
                "name": company.name,
                "about_us": company.about_us,
                "website": company.website,
                "phone": company.phone,
                "headquarters": company.headquarters,
                "founded": company.founded,
                "industry": company.industry,
                "company_type": company.company_type,
                "company_size": company.company_size,
                "specialties": company.specialties,
                "showcase_pages": showcase_pages,
                "affiliated_companies": affiliated_companies,
                "headcount": company.headcount,
            }
    
            # Add employees if requested and available
            if get_employees and company.employees:
                result["employees"] = company.employees
    
            return result
        except Exception as e:
            return handle_tool_error(e, "get_company_profile")
  • The @mcp.tool decorator registers the get_company_profile function with metadata like title and hints.
    @mcp.tool(
        annotations=ToolAnnotations(
            title="Get Company Profile",
            readOnlyHint=True,
            destructiveHint=False,
            openWorldHint=True,
        )
    )
  • Calls the register_company_tools function during MCP server initialization to register the tool.
    register_company_tools(mcp)
  • Function signature defines the input schema: company_name (str), get_employees (bool, default False), returns Dict[str, Any].
    async def get_company_profile(
        company_name: str, get_employees: bool = False
    ) -> Dict[str, Any]:
  • Error handling wrapper specific to this tool.
    return handle_tool_error(e, "get_company_profile")
Behavior3/5

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

Annotations already provide key behavioral hints: readOnlyHint=true and destructiveHint=false indicate a safe read operation, and openWorldHint=true suggests it can handle diverse inputs. The description adds value by noting that 'get_employees' is slower, which is useful context not covered by annotations. However, it doesn't disclose other traits like rate limits, authentication needs, or error handling.

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

Conciseness4/5

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

The description is well-structured and appropriately sized, with a clear purpose statement followed by Args and Returns sections. Each sentence adds value, such as the speed note for 'get_employees.' It could be slightly more concise by integrating the speed detail into the Args section more seamlessly, but overall it's efficient.

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 (2 parameters, read-only operation) and the presence of an output schema (which handles return value documentation), the description is largely complete. It covers purpose and parameters adequately. However, it lacks usage guidelines and some behavioral context like error scenarios, leaving minor gaps.

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 must compensate for the lack of parameter documentation. It effectively explains both parameters: 'company_name' is clarified with examples ('docker', 'anthropic', 'microsoft'), and 'get_employees' is described as affecting speed ('slower'). This adds meaningful semantics beyond the bare schema, though it could detail format constraints for 'company_name'.

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 tool's purpose: 'Get a specific company's LinkedIn profile.' It specifies the verb ('Get') and resource ('company's LinkedIn profile'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_person_profile' or 'get_job_details,' which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_person_profile' or 'search_jobs,' nor does it specify prerequisites or exclusions. The only implied usage is for retrieving company data from LinkedIn, but this is too vague for effective tool selection.

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