Skip to main content
Glama

search_for_companies

Find companies on LinkedIn using search queries and filters like match thresholds to identify relevant business entities for research or networking purposes.

Instructions

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

Input Schema

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

Implementation Reference

  • The main handler function for the 'search_for_companies' tool. It constructs a search URL with query, limit, and threshold parameters, makes a request to the Linkd API using makeLinkdRequest, handles errors, and returns the response in MCP content format.
    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 the input parameters for the tool: query (required string), limit (optional number 1-30, default 10), acceptance_threshold (optional 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 the name, description, schema, and handler function.
    server.tool( searchForCompaniesName, searchForCompaniesDescription, searchForCompaniesSchema, searchForCompaniesTool );

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