Skip to main content
Glama
ZLeventer

linkedin-campaign-manager-mcp

li_get_leadgen_responses

Retrieve LinkedIn Lead Gen Form submission data including question responses and timestamps. Filter by form ID and date range. Use to reconcile leads with CRM, audit lead quality, or validate form integrations.

Instructions

Retrieve actual Lead Gen Form submission data from LinkedIn. Each response includes questionResponses with field-by-field values (first name, last name, email, company, job title, phone, etc.) and submission timestamp. Filter by lead_form_id and/or submitted_after/before date range. Use for lead-to-CRM reconciliation against SFDC or Marketo, for auditing lead quality, or for confirming that a form integration is capturing the right fields. NOTE: This endpoint returns PII — handle output as sensitive data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idNo
lead_form_idNoFilter to a specific Lead Gen Form (numeric ID or URN).
submitted_afterNoISO date (YYYY-MM-DD). Only include responses submitted on or after this date.
submitted_beforeNoISO date (YYYY-MM-DD). Upper bound for submission date.
page_sizeNo

Implementation Reference

  • src/index.ts:187-192 (registration)
    The tool 'li_get_leadgen_responses' is registered on the MCP server with its description, schema, and handler.
    server.tool(
      "li_get_leadgen_responses",
      "Retrieve actual Lead Gen Form submission data from LinkedIn. Each response includes questionResponses with field-by-field values (first name, last name, email, company, job title, phone, etc.) and submission timestamp. Filter by lead_form_id and/or submitted_after/before date range. Use for lead-to-CRM reconciliation against SFDC or Marketo, for auditing lead quality, or for confirming that a form integration is capturing the right fields. NOTE: This endpoint returns PII — handle output as sensitive data.",
      getLeadgenResponsesSchema,
      async (args) => { try { return ok(await getLeadgenResponses(args)); } catch (e) { return err(e); } }
    );
  • Zod schema defining inputs: ad_account_id, lead_form_id, submitted_after, submitted_before, and page_size.
    export const getLeadgenResponsesSchema = {
      ad_account_id: z.string().optional(),
      lead_form_id: z
        .string()
        .optional()
        .describe("Filter to a specific Lead Gen Form (numeric ID or URN)."),
      submitted_after: z
        .string()
        .optional()
        .describe("ISO date (YYYY-MM-DD). Only include responses submitted on or after this date."),
      submitted_before: z.string().optional().describe("ISO date (YYYY-MM-DD). Upper bound for submission date."),
      page_size: z.number().int().min(1).max(100).default(50),
    };
  • Handler function that builds query params (owner, leadForm URN, date range, pagination) and calls the LinkedIn API via liGet('/leadFormResponses', params).
    export async function getLeadgenResponses(args: {
      ad_account_id?: string;
      lead_form_id?: string;
      submitted_after?: string;
      submitted_before?: string;
      page_size?: number;
    }) {
      const account = resolveAdAccount(args.ad_account_id);
      const params: Record<string, string | number> = {
        q: "owner",
        owner: account,
        count: args.page_size ?? 50,
      };
      if (args.lead_form_id) {
        params["leadForm"] = urn("leadGenForm", args.lead_form_id);
      }
      if (args.submitted_after) {
        const t = Date.parse(args.submitted_after);
        if (!Number.isNaN(t)) params["submittedAtTimeRange.start"] = t;
      }
      if (args.submitted_before) {
        const t = Date.parse(args.submitted_before);
        if (!Number.isNaN(t)) params["submittedAtTimeRange.end"] = t;
      }
      return liGet("/leadFormResponses", params);
    }
  • Imports helper utilities: liGet (API call), resolveAdAccount, urn, etc. from ../client.js
    import { z } from "zod";
    import {
      BASE_URL,
      dateRangeParam,
      DEFAULT_END,
      DEFAULT_START,
      liGet,
      liGetRaw,
      resolveAdAccount,
      resolveDate,
      urn,
    } from "../client.js";
Behavior3/5

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

No annotations are provided, so the description carries full burden. It warns about PII and sensitive data handling, and describes the response structure. However, it lacks details on rate limits, authentication requirements, or pagination behavior for a tool with 5 parameters.

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

Conciseness5/5

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

The description is concise (4 sentences) and front-loaded with the core action. Every sentence adds value, with no redundancy.

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

Completeness4/5

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

The description explains the return values (questionResponses with fields and timestamp) and data sensitivity, which is crucial with no output schema. It lacks pagination details but is otherwise complete for the tool's purpose.

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?

The description mentions filtering by lead_form_id and date range, adding meaning to those parameters. However, it does not mention ad_account_id or page_size. Schema coverage is 60%, so description compensates partially but not fully.

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 it retrieves Lead Gen Form submission data from LinkedIn, specifying the resource and the verb ('Retrieve'). It distinguishes itself from sibling tools like li_get_leadgen_forms (which lists forms) by focusing on responses.

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

Usage Guidelines4/5

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

The description provides explicit use cases: lead-to-CRM reconciliation, auditing lead quality, and confirming form integration. It does not mention when not to use or compare to siblings, but the context is clear.

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/ZLeventer/linkedin-campaign-manager-mcp'

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