Skip to main content
Glama

segments_enrichments_run

Kicks off an enrichment as an async Celery task, processing every lead in the segment. Returns {task_sqid} immediately — poll jobs_get for progress.

automation_id is the automation sqid (preferred) or an enrichment type key (e.g. apply_formula, ai_research). When two automations share the same type on one segment, the type key is ambiguous — use the sqid from segments_automations_list instead.

Cost. Per-lead and proportional to the work done, so an AI enrichment costs many times what a validation does. Rates are in billing_pricelist; check billing_balance before running on large segments.

Method: POST /api/v1/workspaces/{workspace_sqid}/segments/{segment_sqid}/enrichments/run/{automation_id}/

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": {
      "automation_id": "<automation_id>",
      "segment_sqid": "<segment_sqid>"
    },
    "name": "segments_enrichments_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
segment_sqidYes
automation_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/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 well: it discloses the async Celery execution model, immediate {task_sqid} return, polling pattern, and per-lead cost scaling including AI-vs-validation multipliers. It omits permission requirements and failure/partial-failure behavior, keeping it short of a 5.

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-loads the core action, then structures semantics, cost, and endpoint in distinct blocks, so an agent can skim. Markdown bolding and the trailing Method line add some bulk but each carries useful information.

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?

For an async job tool with no output schema, the description tells the agent the immediate return shape ({task_sqid}) and how to get results via jobs_get, plus cost context. Nearly complete; only explicit permission/precondition details are 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 0%, so the description must compensate; it heavily defines automation_id (sqid preferred vs. enrichment type key, with an explicit ambiguity warning) and implies segment_sqid's meaning via 'every lead in the segment'. The segment identifier itself isn't explicitly described, a minor gap.

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?

States a specific verb and resource ('Kicks off an enrichment... processing every lead in the segment') and makes the per-segment scope explicit, which implicitly distinguishes it from the run_all sibling without naming it. An agent can tell what it does, though it never explicitly contrasts against alternatives.

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?

Gives clear operational guidance: poll jobs_get for progress, prefer sqid from segments_automations_list when type keys are ambiguous, and check billing_balance before running on large segments. Lacks explicit when-not-to-use exclusions, but the conditions for correct use are well 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.