Skip to main content
Glama

nv_search_companies

Search for companies on LinkedIn Sales Navigator using customizable filters like size, location, industry, and revenue. Retrieve targeted results for lead generation and market analysis.

Instructions

Allows you to search for companies in Sales Navigator applying various filtering criteria. (nv.searchCompanies action).

Input Schema

NameRequiredDescriptionDefault
filterNoOptional. Object that specifies filtering criteria for companies. When multiple filter fields are specified, they are combined using AND logic.
limitNoOptional. Number of search results to return. Defaults to 10, with a maximum value of 100.
termNoOptional. Keyword or phrase to search.

Input Schema (JSON Schema)

{ "properties": { "filter": { "description": "Optional. Object that specifies filtering criteria for companies. When multiple filter fields are specified, they are combined using AND logic.", "properties": { "annualRevenue": { "description": "Optional. Object representing company annual revenue range in million USD.", "properties": { "max": { "enum": [ "0.5", "1", "2.5", "5", "10", "20", "50", "100", "500", "1000", "1000+" ], "type": "string" }, "min": { "enum": [ "0", "0.5", "1", "2.5", "5", "10", "20", "50", "100", "500", "1000" ], "type": "string" } }, "type": "object" }, "industries": { "description": "Optional. Array of enums representing industries. Matches if company works in any of the listed industries. Takes specific values available in the LinkedIn interface.", "type": "array" }, "locations": { "description": "Optional. Array of free-form strings representing locations. Matches if company is headquartered in any of the listed locations.", "type": "array" }, "sizes": { "description": "Optional. Array of enums representing employee count ranges. Matches if company size falls within any of the listed ranges.", "enum": [ "1-10", "11-50", "51-200", "201-500", "501-1000", "1001-5000", "5001-10000", "10001+" ], "type": "array" } }, "type": "object" }, "limit": { "description": "Optional. Number of search results to return. Defaults to 10, with a maximum value of 100.", "type": "number" }, "term": { "description": "Optional. Keyword or phrase to search.", "type": "string" } }, "type": "object" }

Implementation Reference

  • Defines the NvSearchCompaniesTool class which implements the 'nv_search_companies' tool handler, including name, operationName, input schema validation, and MCP Tool definition.
    export class NvSearchCompaniesTool extends OperationTool<TNvSearchCompaniesParams, unknown> { public override readonly name = 'nv_search_companies'; public override readonly operationName = OPERATION_NAME.nvSearchCompanies; protected override readonly schema = z.object({ term: z.string().optional(), limit: z.number().min(1).max(1000).optional(), filter: z .object({ locations: z.array(z.string()).optional(), industries: z.array(z.string()).optional(), sizes: z .array( z.enum([ '1-10', '11-50', '51-200', '201-500', '501-1000', '1001-5000', '5001-10000', '10001+', ]), ) .optional(), annualRevenue: z .object({ min: z.string().optional(), max: z.string().optional(), }) .optional(), }) .optional(), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to search for companies in Sales Navigator applying various filtering criteria. (nv.searchCompanies action).', inputSchema: { type: 'object', properties: { term: { type: 'string', description: 'Optional. Keyword or phrase to search.', }, limit: { type: 'number', description: 'Optional. Number of search results to return. Defaults to 25, with a maximum value of 1000.', }, filter: { type: 'object', description: 'Optional. Object that specifies filtering criteria for companies. When multiple filter fields are specified, they are combined using AND logic.', properties: { sizes: { type: 'array', description: 'Optional. Array of enums representing employee count ranges. Matches if company size falls within any of the listed ranges.', items: { type: 'string', enum: [ '1-10', '11-50', '51-200', '201-500', '501-1000', '1001-5000', '5001-10000', '10001+', ], }, }, locations: { type: 'array', description: 'Optional. Array of free-form strings representing locations. Matches if company is headquartered in any of the listed locations.', items: { type: 'string' }, }, industries: { type: 'array', description: 'Optional. Array of enums representing industries. Matches if company works in any of the listed industries. Takes specific values available in the LinkedIn interface.', items: { type: 'string' }, }, annualRevenue: { type: 'object', description: 'Optional. Object representing company annual revenue range in million USD.', properties: { min: { type: 'string', enum: ['0', '0.5', '1', '2.5', '5', '10', '20', '50', '100', '500', '1000'], }, max: { type: 'string', enum: ['0.5', '1', '2.5', '5', '10', '20', '50', '100', '500', '1000', '1000+'], }, }, }, }, }, }, }, }; } }
  • Registers the NvSearchCompaniesTool instance in the LinkedApiTools class tools array.
    new NvSearchCompaniesTool(progressCallback),
  • Base OperationTool class providing the execute method that invokes the specific LinkedIn API operation (nvSearchCompanies) based on operationName, used by nv_search_companies tool.
    export abstract class OperationTool<TParams, TResult> extends LinkedApiTool<TParams, TResult> { public abstract readonly operationName: TOperationName; public override execute({ linkedapi, args, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: TParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<TResult>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === this.operationName, )! as Operation<TParams, TResult>; return executeWithProgress(this.progressCallback, operation, workflowTimeout, { params: args, progressToken, }); } }

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/Linked-API/linkedapi-mcp'

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