Skip to main content
Glama

Get Campaign Flow

get_campaign_flow
Read-only

sequence is the authored DAG (null for a flowless campaign): sequence.start is the origin node and sequence.nodes the body nodes, each with its id, label, and kind (start / connection_request / send / action / manual / automation / decision / terminal) plus that kind's typed routing — a connection_request's accepted / already_connected / timeout / message_templates (its note), a send's channel / action / replied / follow_up / message_templates (two while it A/B tests a second version), a silent action's channel / action / then, a manual node's action_description / then, an automation node's then (its side-effect is authored on its on_enter trigger), a decision's rule / arms, a terminal (a sink). Timed edges carry {value, unit} (unit w/d/h/m). A connection_request node is always LinkedIn (its channel/action are implicit in its kind); the resolve stage is the action == 'resolve' silent-action node — it looks each profile up, then the campaign flows onward. Walk sequence to see which step feeds which and what gates each hop; join it with nodes by node id for per-node occupancy.

nodes is the per-node occupancy map, keyed by node id: by_status, current, blocked, pending, removed, and off_sequence. It covers every sequence node plus any foreign id the queue throughput or the cursor carries. The start node's current counts every prospect not yet routed onto any node. removed counts prospects removed from the campaign at that node (skipped on its channel, or on every channel for a node without one): they still rest there, and are left out of current, blocked, and pending. off_sequence is True for a node id prospects rest on that the current sequence no longer defines — a position an earlier flow edit stranded — surfaced so those prospects stay visible (such an id is absent from sequence, so read its counts here).

pause is the per-scope pause breakdown (null for a non-outreach agent): campaign.paused holds every action node; linkedin.reason (needs_reconnect / auto / manual, with until on an auto rate-limit pause) holds every LinkedIn action node while email stays live; and connection_request.until holds only connection_request nodes. Read it to answer "why is step 3 not firing" per node — a paused scope explains a node with pending occupants but no throughput. Dict with sequence (the authored DAG as stored, or null for a flowless campaign), nodes {node_id: {by_status, current, blocked, pending, removed, off_sequence}}, and pause (per-scope pause breakdown; see above). blocked is how many resting prospects have a blocked enactment (see report_enactment_blocked; clear one for retry with retry_blocked_enactment); pending how many rest on an action/manual/decision node whose step hasn't run for them yet — for a manual node, awaiting the human who performs it — no intervention needed, unlike blocked. Null sequence and empty nodes for a flowless campaign with no queue activity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesID of the agent (campaign) to read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "description": "ID of the agent (campaign) to read.",
      +  "type": "integer"
      +}
    • removedInput schema / properties / task_id
      Removed value: -{
      -  "description": "ID of the task (campaign) to read.",
      -  "type": "integer"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "task_id"
      -]New value: +[
      +  "agent_id"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With only readOnlyHint=true in annotations, the description adds substantial behavioral context: null `sequence` for a flowless campaign, `off_sequence` marking stranded node ids, `removed` prospects still resting but excluded from current/blocked/pending, and `pause` explaining why a node has pending occupants but no throughput. These are exactly the caveats an agent needs before interpreting the live view.

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 description is long but front-loads the summary and use cases before diving into DAG and occupancy semantics. Much of the length is necessary because there is no output schema, though the `<returns>` block repeats some pause details already explained above.

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?

Given no output schema and a complex nested return shape, the description fully documents `sequence`, `nodes`, and `pause`, including null and empty cases, node kinds, routing fields, and the distinction between blocked and pending. An agent has everything needed to call and interpret the tool correctly.

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 schema already defines `agent_id` as 'ID of the agent (campaign) to read.' The description adds meaningful scope beyond that: the parameter can be any of the user's campaigns and is not limited to the agent in context. This is a useful clarification, though not a syntax or format detail.

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 opens with a specific verb and resource: 'Read the live Campaign Flow for an agent: the authored `sequence` DAG plus, per node, how many prospects currently rest there.' It distinguishes this view from sibling tools by tying it to the Campaign Flow tab and to diagnostic questions about prospect location and step firing.

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?

It gives explicit use cases: answer 'where are my prospects', 'how many are stuck at the connect step', or trace the campaign's shape. It also clarifies scope: 'Pass any of the user's campaigns; it is not limited to the agent in context.' It does not name when to choose this over sibling tools like get_node_history, so it stops short of full when-not/alternative routing.

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.

Resources