Skip to main content
Glama

export_leads

Destructive

Full-fidelity export of leads for offline analysis / backup. Returns { leads, count, limit, offset }. Each lead has ALL its columns, ai_memory[] (every AI-memory item attached to the lead — all categories, full untruncated content, newest first), and (unless disabled) nested contact and account objects. Same filters as list_leads. Paginate with limit (≤100) + offset — the whole base pulls in ceil(total/100) calls. Prefer this over list_leads when you need the complete data (list_leads trims memory for size).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_leads"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows (default 20, max 100)
customNoFilter on lead custom fields (list_custom_fields entity 'leads'): { key: value } — value = equals (multiselect: contains), array = any of (multiselect: contains all), null = empty. E.g. { "stufe": "A", "marken": ["KTM"] }.
offsetNoPagination offset (default 0)
searchNoFree-text search term
statusNoOnly entries with this status
categoryNoExact category match (case-insensitive)
order_byNoscore | last_activity | created
owner_idNoID of the owner (user)
min_scoreNoOnly export leads with at least this score (0-100)
stale_daysNoOnly leads whose last activity is older than N days
campaign_idNoID of the campaign
no_campaignNoOnly leads not assigned to any campaign
include_accountNoNest the lead's account (default true)
include_contactNoNest the lead's contact (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / campaign_id / description
      Added value: +"ID of the campaign"
    • addedInput schema / properties / min_score / description
      Added value: +"Only export leads with at least this score (0-100)"
    • addedInput schema / properties / owner_id / description
      Added value: +"ID of the owner (user)"
    • addedInput schema / properties / search / description
      Added value: +"Free-text search term"
    • addedInput schema / properties / status / description
      Added value: +"Only entries with this status"
  2. First observed

TDQS

A4.1/5.0
Behavior2/5

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

The description frames the tool as a non-mutating read/"export ... for offline analysis / backup" that only returns data, while the annotations declare readOnlyHint=false and destructiveHint=true. That mismatch is never acknowledged or explained, so an agent gets a misleading safety profile. To its credit it does disclose rich behavior (return shape, untruncated newest-first ai_memory, nested contact/account defaults, page-size cap and call count), which keeps this above a 1.

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?

Front-loaded with purpose and the highest-value distinction, then return shape, then pagination; every sentence carries information. The ai_memory parenthetical is dense but its specificity (all categories, full content, newest first) is the reason an agent would choose this over list_leads.

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?

With no output schema, the description correctly takes on the return contract ({ leads, count, limit, offset }) and the nested-object shape, and with 14 optional parameters it explains the two include_* toggles and pagination. The gap is the un-addressed destructive/read-only question flagged by the annotations.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it tells the agent that the filter set is identical to list_leads and that include_contact/include_account are on "unless disabled". It also pins the pagination contract (limit ≤100, offset) that the schema only states per-parameter.

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 first sentence names a specific verb and resource ("Full-fidelity export of leads") and states the use case (offline analysis / backup), and the final sentence explicitly distinguishes it from the sibling list_leads. An agent can tell exactly what this returns versus what the list variant returns without opening a schema.

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

Usage Guidelines5/5

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

It names the alternative (list_leads) and the precise condition that selects this tool over it ("when you need the complete data (list_leads trims memory for size)"). It also states filter parity with list_leads and how to drive the full pull (limit ≤100 + offset, ceil(total/100) calls), leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.