Skip to main content
Glama

get_linkedin_google_company

Find LinkedIn company profiles using Google search to quickly identify and retrieve business information based on company names or website domains.

Instructions

Search for LinkedIn companies using Google search. First result is usually the best match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
count_per_keywordNoMax results per keyword
keywordsYesCompany keywords for search. For example, company name or company website
timeoutNoTimeout in seconds
with_urnNoInclude URNs in response (increases execution time)

Implementation Reference

  • The handler function that executes the tool logic: prepares request data, calls the AnySite API via makeRequest to the /api/linkedin/google/company endpoint, formats and returns the JSON response or error.
    async ({ keywords, with_urn, count_per_keyword, timeout }) => {
      const requestData = { timeout, keywords, with_urn, count_per_keyword };
      log(`Starting LinkedIn Google company search for keywords: ${keywords.join(', ')}`);
      try {
        const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_GOOGLE_COMPANY, requestData);
        return {
          content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
        };
      } catch (error) {
        log("LinkedIn Google company search error:", error);
        return {
          content: [{ type: "text", text: `LinkedIn Google company search API error: ${formatError(error)}` }],
          isError: true
        };
      }
    }
  • Inline Zod schema for input validation of tool parameters: keywords (array), with_urn (bool), count_per_keyword (num), timeout (num).
    {
      keywords: z.array(z.string()).describe("Company search keywords"),
      with_urn: z.boolean().default(false).describe("Include LinkedIn URN"),
      count_per_keyword: z.number().default(1).describe("Results per keyword"),
      timeout: z.number().default(300).describe("Timeout in seconds")
    },
  • src/index.ts:663-687 (registration)
    MCP tool registration call using server.tool() with name 'get_linkedin_google_company', description, input schema, and handler function.
      "get_linkedin_google_company",
      "Search company via Google",
      {
        keywords: z.array(z.string()).describe("Company search keywords"),
        with_urn: z.boolean().default(false).describe("Include LinkedIn URN"),
        count_per_keyword: z.number().default(1).describe("Results per keyword"),
        timeout: z.number().default(300).describe("Timeout in seconds")
      },
      async ({ keywords, with_urn, count_per_keyword, timeout }) => {
        const requestData = { timeout, keywords, with_urn, count_per_keyword };
        log(`Starting LinkedIn Google company search for keywords: ${keywords.join(', ')}`);
        try {
          const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_GOOGLE_COMPANY, requestData);
          return {
            content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
          };
        } catch (error) {
          log("LinkedIn Google company search error:", error);
          return {
            content: [{ type: "text", text: `LinkedIn Google company search API error: ${formatError(error)}` }],
            isError: true
          };
        }
      }
    );
  • TypeScript interface defining the shape of input arguments for the tool, matching the Zod schema.
    export interface GetLinkedinGoogleCompanyArgs {
      keywords: string[];
      with_urn?: boolean;
      count_per_keyword?: number;
      timeout?: number;
    }
  • Type guard/validation function for ensuring input args conform to GetLinkedinGoogleCompanyArgs interface.
    export function isValidGetLinkedinGoogleCompanyArgs(
      args: unknown
    ): args is GetLinkedinGoogleCompanyArgs {
      if (typeof args !== "object" || args === null) return false;
      const obj = args as Record<string, unknown>;
      if (!Array.isArray(obj.keywords) || obj.keywords.length === 0) return false;
      if (obj.with_urn !== undefined && typeof obj.with_urn !== "boolean") return false;
      if (
        obj.count_per_keyword !== undefined &&
        (typeof obj.count_per_keyword !== "number" ||
          obj.count_per_keyword < 1 ||
          obj.count_per_keyword > 10)
      ) {
        return false;
      }
      if (obj.timeout !== undefined && typeof obj.timeout !== "number") return false;
      return true;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'First result is usually the best match,' which hints at result quality but doesn't cover critical aspects like rate limits, authentication needs, error handling, or what 'increases execution time' means for the 'with_urn' parameter. For a search tool with external dependencies, this is insufficient.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every sentence adds value: the first defines the tool, the second provides a useful heuristic about result quality. Zero waste.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for this tool's complexity. It doesn't explain what the output looks like (e.g., company details, URLs, URNs), error conditions, or how it integrates Google search with LinkedIn data. For a 4-parameter tool with external dependencies, more context is needed.

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 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain search algorithm details or result formatting). Baseline 3 is appropriate when schema does the heavy lifting.

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: 'Search for LinkedIn companies using Google search.' It specifies the resource (LinkedIn companies) and method (Google search). However, it doesn't explicitly differentiate from sibling tools like 'get_linkedin_company' or 'google_search', which would require a 5.

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. There are multiple sibling tools for LinkedIn data (e.g., 'get_linkedin_company', 'google_search'), but no indication of when this hybrid approach is preferred or what its limitations are compared to direct LinkedIn API 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/anysiteio/hdw-mcp-server'

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