For AI agents: the complete documentation index is available at https://docs.clickmax.io/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.io/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.io/en/reference/api/lead-context.md.
  • English
  • Full lead context (leads_context)

    The Clickmax MCP tool leads_context returns, in a single call, everything the platform knows about a lead, organized in 16 sections. It is the recommended first call when the AI is attending or analysing a specific lead — no need to combine several tools to build the picture.

    Prerequisite: an AI client connected to the Clickmax MCP. See how to connect your AI with OAuth.

    Returned sections

    Use the names below in the sections parameter to request only a subset.

    SectionWhat it carries
    leadLead profile: core and contact data
    customFieldsThe lead's custom-field values, with each field's description
    tagsTags applied to the lead
    listsLists the lead belongs to
    opportunitiesThe lead's opportunity cards, with pipeline, stage and value
    lostReasonsLoss reasons recorded on past opportunities
    notesNotes recorded on the lead
    activitiesThe lead's activity timeline
    purchasesPlatform purchases, external sales and LTV
    capturesPage and funnel captures, with UTMs
    formsForm and quiz submissions, with score
    messagingAggregate conversation counters (sent, read, received, delivered-but-unread), latest messages per conversation and broadcast sends per channel
    appointmentsScheduled meetings and tasks
    membersMembers-area access and course progress
    flowsAutomations the lead entered
    extrasWebinars, temperature history, companies, AI conversation signal and voice/WhatsApp calls

    Parameters

    ParameterTypeRequiredEffect
    leadIdlead idyesLead whose context is loaded
    sectionslist of section namesnoReturns only the requested sections; without it, all sections are returned
    sinceISO 8601 date-timenoRestricts temporal sections (activities, messaging, purchases…) to records from that date on
    limitPerSectioninteger from 1 to 100noMaximum items per temporal list; the default is 20. Does not affect state sections, which return in full

    Truncation and pagination

    The limitPerSection cap and the totalCount field apply to the temporal (windowed) lists: notes, activities, purchases (transactions and external sales), form submissions, conversations (most recent first), appointments (meetings and tasks), automations and the extras histories (webinars, temperature, calls). Each of those lists carries a totalCount with the real number of records; if a list came back with fewer items than its totalCount, it was truncated by limitPerSection.

    The messages within each conversation are also limited by limitPerSection, but not counted — they carry no totalCount.

    The state sections — tags, lists, custom fields, opportunities, loss reasons and companies — return in full, with no cap and no totalCount.

    leads_context does not paginate. To walk through every record of a section, use the dedicated tool:

    SectionTool with full pagination
    activitieslead_activities_list_by_lead
    opportunitiescards_list_by_lead
    purchasesleads_payments

    Merged leads

    If the given leadId belongs to a lead that was merged into another one, the response carries the surviving lead's context and includes a resolvedFrom field indicating the original lead and when the merge happened.