get_linkedin_company
Retrieve detailed company information from LinkedIn using company aliases, URLs, or URN identifiers to access business data and profiles.
Instructions
Get detailed information about a LinkedIn company
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company | Yes | Company Alias or URL or URN (example: 'openai' or 'company:1441') | |
| timeout | No | Timeout in seconds |
Implementation Reference
- src/index.ts:578-601 (handler)Full registration and handler implementation for the 'get_linkedin_company' MCP tool. Registers the tool with input schema, description, and async handler that makes HTTPS POST request to AnySite API endpoint '/api/linkedin/company' to fetch company data.server.tool( "get_linkedin_company", "Get LinkedIn company information", { company: z.string().describe("Company alias, URL or URN"), timeout: z.number().default(300).describe("Timeout in seconds") }, async ({ company, timeout }) => { const requestData = { timeout, company }; log(`Starting LinkedIn company lookup for: ${company}`); try { const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_COMPANY, requestData); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { log("LinkedIn company lookup error:", error); return { content: [{ type: "text", text: `LinkedIn company API error: ${formatError(error)}` }], isError: true }; } } );
- src/types.ts:107-110 (schema)TypeScript interface defining the input arguments for get_linkedin_company tool.export interface GetLinkedinCompanyArgs { company: string; timeout?: number; }
- src/types.ts:616-624 (helper)Runtime validation function to check if arguments match GetLinkedinCompanyArgs interface.export function isValidGetLinkedinCompanyArgs( args: unknown ): args is GetLinkedinCompanyArgs { if (typeof args !== "object" || args === null) return false; const obj = args as Record<string, unknown>; if (typeof obj.company !== "string" || !obj.company.trim()) return false; if (obj.timeout !== undefined && typeof obj.timeout !== "number") return false; return true; }
- src/index.ts:41-41 (helper)API endpoint configuration for the LinkedIn company lookup used by the tool handler.LINKEDIN_COMPANY: "/api/linkedin/company",