Skip to main content
Glama

search_for_companies

Find companies on LinkedIn by applying specific search queries and match score thresholds. Filter results with a custom limit for precise, targeted data retrieval.

Instructions

Search for companies on Linkd using filters like query and match threshold.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acceptance_thresholdNoMatch score threshold between 0 and 100
limitNoMaximum number of results to return (1–30)
queryYesThe search query, e.g., 'Tech companies in California'

Implementation Reference

  • The main handler function `searchForCompaniesTool` that constructs the API URL, makes a request to search for companies using `makeLinkdRequest`, handles errors, and returns the response as text content.
    export const searchForCompaniesTool = async ({ query, limit = 10, acceptance_threshold = 60, }: SearchForCompaniesParams) => { const url = new URL("https://search.linkd.inc/api/search/companies"); url.searchParams.append("query", query); url.searchParams.append("limit", String(Math.min(limit, 30))); url.searchParams.append("acceptance_threshold", String(Math.max(0, Math.min(100, acceptance_threshold)))); const response = await makeLinkdRequest(url.toString(), {}); const responseData = await response.json(); if (responseData.error) { throw new Error( `Failed to search for companies: ${JSON.stringify(responseData.error)}` ); } return { content: [ { type: "text" as const, text: `search completed successfully: ${JSON.stringify(responseData, null, 2)}` } ] }; };
  • Zod schema defining input parameters: query (string), limit (number 1-30 default 10), acceptance_threshold (number 0-100 default 60).
    export const searchForCompaniesSchema = { query: z.string().describe("The search query, e.g., 'Tech companies in California'"), limit: z.number().min(1).max(30).default(10).describe("Maximum number of results to return (1–30)"), acceptance_threshold: z .number() .min(0) .max(100) .default(60) .describe("Match score threshold between 0 and 100"), };
  • Registers the `search_for_companies` tool on the MCP server by calling `server.tool` with name, description, schema, and handler.
    server.tool( searchForCompaniesName, searchForCompaniesDescription, searchForCompaniesSchema, searchForCompaniesTool );

Other Tools

Related 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/automcp-app/linkd-mcp'

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