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

fetch_company

Retrieve LinkedIn company information including basic details, employees, posts, and decision makers to support business intelligence and lead generation.

Instructions

Allows you to open a company page to retrieve its basic information (st.openCompanyPage action). Can optionally retrieve employees, posts and decision makers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyUrlYesPublic or hashed LinkedIn URL of the company. (e.g., 'https://www.linkedin.com/company/microsoft')
retrieveEmployeesNoOptional. Whether to retrieve the company's employees information. Default is false.
retrievePostsNoOptional. Whether to retrieve the company's posts information. Default is false.
retrieveDMsNoOptional. Whether to retrieve the company's decision makers information. Default is false.
postRetrievalConfigNoOptional. Configuration for retrieving posts. Available only if retrievePosts is true.
dmRetrievalConfigNoOptional. Configuration for retrieving decision makers. Available only if retrieveDMs is true.
employeeRetrievalConfigNoOptional. Configuration for retrieving employees. Available only if retrieveEmployees is true.

Implementation Reference

  • The FetchCompanyTool class implements the 'fetch_company' MCP tool. It extends OperationTool, defines the tool name, the specific LinkedIn API operationName, Zod input schema for validation, and the getTool() method that returns the MCP Tool definition with inputSchema.
    export class FetchCompanyTool extends OperationTool<TFetchCompanyParams, unknown> {
      public override readonly name = 'fetch_company';
      public override readonly operationName = OPERATION_NAME.fetchCompany;
      protected override readonly schema = z.object({
        companyUrl: z.string(),
        retrieveEmployees: z.boolean().optional().default(false),
        retrievePosts: z.boolean().optional().default(false),
        retrieveDMs: z.boolean().optional().default(false),
        postRetrievalConfig: z
          .object({
            limit: z.number().min(1).max(20).optional(),
            since: z.string().optional(),
          })
          .optional(),
        dmRetrievalConfig: z
          .object({
            limit: z.number().min(1).max(20).optional(),
          })
          .optional(),
        employeeRetrievalConfig: z
          .object({
            limit: z.number().min(1).max(500).optional(),
            filter: z
              .object({
                firstName: z.string().optional(),
                lastName: z.string().optional(),
                position: z.string().optional(),
                locations: z.array(z.string()).optional(),
                industries: z.array(z.string()).optional(),
                schools: z.array(z.string()).optional(),
              })
              .optional(),
          })
          .optional(),
      });
    
      public override getTool(): Tool {
        return {
          name: this.name,
          description:
            'Allows you to open a company page to retrieve its basic information (st.openCompanyPage action). Can optionally retrieve employees, posts and decision makers.',
          inputSchema: {
            type: 'object',
            properties: {
              companyUrl: {
                type: 'string',
                description:
                  "Public or hashed LinkedIn URL of the company. (e.g., 'https://www.linkedin.com/company/microsoft')",
              },
              retrieveEmployees: {
                type: 'boolean',
                description:
                  "Optional. Whether to retrieve the company's employees information. Default is false.",
              },
              retrievePosts: {
                type: 'boolean',
                description:
                  "Optional. Whether to retrieve the company's posts information. Default is false.",
              },
              retrieveDMs: {
                type: 'boolean',
                description:
                  "Optional. Whether to retrieve the company's decision makers information. Default is false.",
              },
              postRetrievalConfig: {
                type: 'object',
                description:
                  'Optional. Configuration for retrieving posts. Available only if retrievePosts is true.',
                properties: {
                  limit: {
                    type: 'number',
                    description:
                      'Optional. Number of posts to retrieve. Defaults to 20, with a maximum value of 20.',
                  },
                  since: {
                    type: 'string',
                    description:
                      'Optional. ISO 8601 timestamp to filter posts published after the specified time.',
                  },
                },
              },
              dmRetrievalConfig: {
                type: 'object',
                description:
                  'Optional. Configuration for retrieving decision makers. Available only if retrieveDMs is true.',
                properties: {
                  limit: {
                    type: 'number',
                    description:
                      'Optional. Number of decision makers to retrieve. Defaults to 20, with a maximum value of 20. If a company has fewer decision makers than specified, only the available ones will be returned.',
                  },
                },
              },
              employeeRetrievalConfig: {
                type: 'object',
                description:
                  'Optional. Configuration for retrieving employees. Available only if retrieveEmployees is true.',
                properties: {
                  limit: {
                    type: 'number',
                    description:
                      'Optional. Maximum number of employees to retrieve. Defaults to 500, with a maximum value of 500.',
                  },
                  filter: {
                    type: 'object',
                    description:
                      'Optional. Object that specifies filtering criteria for employees. When multiple filter fields are specified, they are combined using AND logic.',
                    properties: {
                      firstName: {
                        type: 'string',
                        description: 'Optional. First name of employee.',
                      },
                      lastName: {
                        type: 'string',
                        description: 'Optional. Last name of employee.',
                      },
                      position: {
                        type: 'string',
                        description: 'Optional. Job position of employee.',
                      },
                      locations: {
                        type: 'array',
                        description:
                          'Optional. Array of free-form strings representing locations. Matches if employee is located in any of the listed locations.',
                        items: { type: 'string' },
                      },
                      industries: {
                        type: 'array',
                        description:
                          'Optional. Array of enums representing industries. Matches if employee works in any of the listed industries. Takes specific values available in the LinkedIn interface.',
                        items: { type: 'string' },
                      },
                      schools: {
                        type: 'array',
                        description:
                          'Optional. Array of institution names. Matches if employee currently attends or previously attended any of the listed institutions.',
                        items: { type: 'string' },
                      },
                    },
                  },
                },
              },
            },
            required: ['companyUrl'],
          },
        };
      }
    }
  • Instantiates and registers the FetchCompanyTool in the LinkedApiTools class's tools array, making it available as part of the MCP tools collection.
    new FetchCompanyTool(progressCallback),
  • The OperationTool base class provides the core execute handler logic for operation-based tools like fetch_company. It looks up the specific operation by name from the LinkedAPI instance and executes it with progress tracking.
    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,
        });
      }
    }
  • Defines the MCP-compatible inputSchema for the fetch_company tool, matching the Zod schema for validation.
    public override getTool(): Tool {
      return {
        name: this.name,
        description:
          'Allows you to open a company page to retrieve its basic information (st.openCompanyPage action). Can optionally retrieve employees, posts and decision makers.',
        inputSchema: {
          type: 'object',
          properties: {
            companyUrl: {
              type: 'string',
              description:
                "Public or hashed LinkedIn URL of the company. (e.g., 'https://www.linkedin.com/company/microsoft')",
            },
            retrieveEmployees: {
              type: 'boolean',
              description:
                "Optional. Whether to retrieve the company's employees information. Default is false.",
            },
            retrievePosts: {
              type: 'boolean',
              description:
                "Optional. Whether to retrieve the company's posts information. Default is false.",
            },
            retrieveDMs: {
              type: 'boolean',
              description:
                "Optional. Whether to retrieve the company's decision makers information. Default is false.",
            },
            postRetrievalConfig: {
              type: 'object',
              description:
                'Optional. Configuration for retrieving posts. Available only if retrievePosts is true.',
              properties: {
                limit: {
                  type: 'number',
                  description:
                    'Optional. Number of posts to retrieve. Defaults to 20, with a maximum value of 20.',
                },
                since: {
                  type: 'string',
                  description:
                    'Optional. ISO 8601 timestamp to filter posts published after the specified time.',
                },
              },
            },
            dmRetrievalConfig: {
              type: 'object',
              description:
                'Optional. Configuration for retrieving decision makers. Available only if retrieveDMs is true.',
              properties: {
                limit: {
                  type: 'number',
                  description:
                    'Optional. Number of decision makers to retrieve. Defaults to 20, with a maximum value of 20. If a company has fewer decision makers than specified, only the available ones will be returned.',
                },
              },
            },
            employeeRetrievalConfig: {
              type: 'object',
              description:
                'Optional. Configuration for retrieving employees. Available only if retrieveEmployees is true.',
              properties: {
                limit: {
                  type: 'number',
                  description:
                    'Optional. Maximum number of employees to retrieve. Defaults to 500, with a maximum value of 500.',
                },
                filter: {
                  type: 'object',
                  description:
                    'Optional. Object that specifies filtering criteria for employees. When multiple filter fields are specified, they are combined using AND logic.',
                  properties: {
                    firstName: {
                      type: 'string',
                      description: 'Optional. First name of employee.',
                    },
                    lastName: {
                      type: 'string',
                      description: 'Optional. Last name of employee.',
                    },
                    position: {
                      type: 'string',
                      description: 'Optional. Job position of employee.',
                    },
                    locations: {
                      type: 'array',
                      description:
                        'Optional. Array of free-form strings representing locations. Matches if employee is located in any of the listed locations.',
                      items: { type: 'string' },
                    },
                    industries: {
                      type: 'array',
                      description:
                        'Optional. Array of enums representing industries. Matches if employee works in any of the listed industries. Takes specific values available in the LinkedIn interface.',
                      items: { type: 'string' },
                    },
                    schools: {
                      type: 'array',
                      description:
                        'Optional. Array of institution names. Matches if employee currently attends or previously attended any of the listed institutions.',
                      items: { type: 'string' },
                    },
                  },
                },
              },
            },
          },
          required: ['companyUrl'],
        },
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions what can be retrieved, it lacks critical behavioral information: authentication requirements, rate limits, LinkedIn API constraints, error conditions, or what 'basic information' includes. The mention of 'st.openCompanyPage action' is opaque without context.

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 appropriately concise (two sentences) and front-loaded with the core purpose. The parenthetical 'st.openCompanyPage action' adds some noise but doesn't significantly detract from clarity. Every sentence contributes to understanding the tool's capabilities.

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?

For a complex tool with 7 parameters, nested objects, no output schema, and no annotations, the description is inadequate. It doesn't explain return values, error handling, LinkedIn-specific constraints, or how the optional retrievals affect performance. The agent would struggle to use this tool effectively without trial and error.

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 fully documents all 7 parameters. The description adds minimal value beyond the schema - it mentions the same optional retrievals (employees, posts, decision makers) that are already detailed in parameter descriptions. No additional parameter semantics are provided.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'open a company page to retrieve its basic information' with optional retrieval of employees, posts, and decision makers. It specifies the verb ('open/retrieve') and resource ('company page'), but doesn't explicitly differentiate from sibling tools like 'nv_fetch_company' or '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?

The description provides no guidance on when to use this tool versus alternatives like 'nv_fetch_company' or 'search_companies'. It mentions optional retrieval capabilities but doesn't explain when these should be used or any prerequisites for successful operation.

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