Skip to main content
Glama
Linked-API
by Linked-API

nv_search_companies

Search for companies in Sales Navigator using filters like size, location, industry, and revenue. Combine criteria with AND logic to find targeted prospects.

Instructions

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

Input Schema

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

Implementation Reference

  • Base class OperationTool provides the execute() method that all operation-based tools inherit. It looks up the matching operation by operationName and delegates to executeWithProgress.
    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,
        });
      }
    }
  • Concrete tool class for 'nv_search_companies'. Sets the tool name, operation name (nvSearchCompanies), defines the Zod validation schema, and provides the MCP Tool definition (description + inputSchema). The execute() method is inherited from OperationTool.
    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+'],
                      },
                    },
                  },
                },
              },
            },
          },
        };
      }
    }
  • Zod schema for validating tool input parameters: term (string), limit (number 1-1000), and filter (locations, industries, sizes, annualRevenue).
    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(),
    });
  • Registration: The NvSearchCompaniesTool is instantiated and added to the tools array in LinkedApiTools constructor, making it available for dispatch via toolByName().
    new NvSearchCompaniesTool(progressCallback),
  • Helper that wraps operation execution with progress notifications. Calls the LinkedApi operation's execute/result methods and reports progress via callback.
    export async function executeWithProgress<TParams, TResult>(
      progressCallback: (progress: LinkedApiProgressNotification) => void,
      operation: Operation<TParams, TResult>,
      workflowTimeout: number,
      {
        params,
        workflowId,
        progressToken,
      }: { params?: TParams; workflowId?: string; progressToken?: string | number } = {},
    ): Promise<TMappedResponse<TResult>> {
      let progress = 0;
    
      progressCallback({
        progressToken,
        progress,
        total: 100,
        message: `Starting workflow ${operation.operationName}...`,
      });
    
      const interval = setInterval(
        () => {
          if (progress < 50) {
            progress += 5;
          } else if (progress < 98) {
            progress += 1;
          }
    
          progressCallback({
            progressToken,
            progress,
            total: 100,
            message: `Executing workflow ${operation.operationName}...`,
          });
        },
        Math.max(workflowTimeout / 20, 10000),
      );
    
      try {
        if (!workflowId) {
          workflowId = await operation.execute(params as TParams);
        }
        const result = await operation.result(workflowId, {
          timeout: workflowTimeout,
        });
        clearInterval(interval);
    
        progressCallback({
          progressToken,
          progress: 100,
          total: 100,
          message: `Workflow ${operation.operationName} completed successfully`,
        });
    
        return result;
      } catch (error) {
        clearInterval(interval);
        if (error instanceof LinkedApiWorkflowTimeoutError) {
          throw generateTimeoutError(error);
        }
    
        throw error;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states the search action without disclosing behavioral traits like read-only nature, result limits beyond the schema defaults, or any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short, front-loaded with the purpose, and contains no wasted words. However, it lacks structure such as listing filter types or providing usage hints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description is too minimal. It does not explain return format, pagination behavior beyond schema defaults, or any limitations of the search, which is incomplete for a tool with nested filters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains parameters. The description adds no additional meaning beyond 'various filtering criteria', which is redundant.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search', the resource 'companies', and the scope 'in Sales Navigator' with filtering criteria. It distinguishes itself from sibling tools like 'nv_search_people' and 'search_companies'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use, when-not-to-use, or alternatives are mentioned. The description does not help an agent decide between this and similar tools like 'search_companies'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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