Skip to main content
Glama

leads_bulk_selection_action

The "Select all N leads in this list" counterpart of the per-sqid bulk endpoints. selection is the lead list's query parameters (segment, filter, view, q, import_id, status, qf); the job acts on every lead the list returns for them, resolved once when it starts.

action and the endpoint it behaves like:

  • add_to_segment (segment_sqid, new creates a list) — leads_bulk_add_to_segment_bulk

  • remove_from_segment (segment_sqid) — leads_bulk_remove_from_segment

  • add_to_campaign (campaign_sqid) — campaigns_add_leads

  • reset — leads_bulk_reset_to_new

  • archive — leads_bulk_archive

  • delete — leads_bulk_delete; refused unless the selection is narrowed, so an empty one cannot wipe the workspace

Like the list, an empty status leaves ARCHIVED leads out; pass __all__ to include them. Runs in the background: 202 with task_sqid; the finished job's result has done_count and skipped counted by reason code. E.g. {"action": "delete", "selection": {"import_id": "nlppkx"}} removes one CSV import.

Method: POST /api/v1/workspaces/{workspace_sqid}/leads/bulk-selection/

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "selection": "<selection>"
    },
    "name": "leads_bulk_selection_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesWhich bulk action to run; each behaves like its per-sqid endpoint. * `add_to_segment` - add_to_segment * `remove_from_segment` - remove_from_segment * `add_to_campaign` - add_to_campaign * `reset` - reset * `archive` - archive * `delete` - delete
selectionYesThe lead list's query parameters; every lead the list returns, across all pages, is acted on.
segment_sqidNoFor add_to_segment / remove_from_segment. `new` creates a list for add_to_segment.
campaign_sqidNoFor add_to_campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that the job resolves the selection once at start, runs in the background returning 202 with task_sqid, and that the finished job's result carries done_count and skipped counted by reason code. It also flags the destructive-guard behavior on empty selections, which is exactly the kind of context an agent needs before invoking a delete.

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 scope statement is front-loaded and the action list is bulleted, which makes a dense tool scannable. It is longer than typical and some parenthetical enumerations of query parameters duplicate the schema, but almost every sentence carries actionable information.

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

Completeness5/5

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

For a background job with no output schema, the description supplies the async contract, the response envelope, and the shape of the finished result. Nothing an agent would need in order to call this correctly or interpret the outcome appears to be missing.

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 beyond the schema by tying segment_sqid and campaign_sqid to specific actions and explaining that `new` creates a list and `__all__` includes archived leads. Some of this, notably the empty-status/ARCHIVED note, merely restates what the schema already says.

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 opening line names the exact behavior: the 'Select all N leads in this list' counterpart to the per-sqid bulk endpoints, applied across all pages. Combined with the action enumeration, an agent can tell precisely what this does and how it differs from siblings like leads_bulk_delete or leads_bulk_add_to_segment.

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 explicitly maps each of the six actions to the per-sqid endpoint it mimics, which is a direct when-to-use routing table against the sibling tools. It also states the exclusion rule for delete (refused unless the selection is narrowed) and the archived-status default, so both selection and safety conditions are covered.

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.