enrich_linkedin
Retrieve detailed LinkedIn profile data by entering a profile URL. This tool helps extract structured information for user analysis, research, or integrations, costing 1 credit per lookup.
Instructions
Retrieves detailed profile information for a specific LinkedIn URL. Each successful lookup costs 1 credit.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The LinkedIn profile URL to look up. |
Implementation Reference
- src/tools/enrich-linkedin.ts:16-39 (handler)The core handler function for the 'enrich_linkedin' tool. It takes a LinkedIn URL, makes an API request to 'https://search.linkd.inc/api/enrich/linkedin', processes the response, and returns formatted content or throws an error if failed.export const enrichLinkedinTool = async ({ url, }: EnrichLinkedinParams) => { const apiUrl = new URL("https://search.linkd.inc/api/enrich/linkedin"); apiUrl.searchParams.append("url", url); const response = await makeLinkdRequest(apiUrl.toString(), {}); const responseData = await response.json(); if (responseData.error) { throw new Error( `Failed to enrich LinkedIn profile: ${JSON.stringify(responseData.error)}` ); } return { content: [ { type: "text" as const, text: `enrichment completed successfully: ${JSON.stringify(responseData, null, 2)}` } ] }; };
- src/tools/enrich-linkedin.ts:8-10 (schema)Zod schema defining the input parameters for the 'enrich_linkedin' tool, specifically the 'url' field.export const enrichLinkedinSchema = { url: z.string().describe("The LinkedIn profile URL to look up."), };
- src/server_setup.ts:26-31 (registration)Registration of the 'enrich_linkedin' tool with the MCP server using server.tool(), providing name, description, schema, and handler.server.tool( enrichLinkedinName, enrichLinkedinDescription, enrichLinkedinSchema, enrichLinkedinTool );