Skip to main content

Acting with MCP tools

Intermediate ⏱ 15 min mcp · tools · actions

You will build: a pipeline that doesn't just decide — it acts: an MCP stage calls a real tool when an event crosses the line.

… → llm:reason → mcp:act → (audit out)

Prerequisites

  • The oncall app from Your first LLM stage.
  • An MCP plugin installed in Pulse for the tool you want to call (from the plugin catalog in the Pulse UI).

1 · Add the acting stage

- name: act
engine: mcp
mcpTools: [ notify.oncall ]

mcpTools whitelists which tools this stage may invoke — a stage can never call a tool you didn't grant it.

2 · Deploy and check the pipeline view

pulse deploy .

If the plugin behind notify.oncall is not installed yet, the act stage shows blocked.

Honest constraint

The blocked state is a feature: a missing dependency is visible in the pipeline, never a silent no-op. Install the plugin and the stage goes live.

3 · Install the plugin, watch it unblock

pulse plugins list # browse the catalog
pulse plugins install <plugin-id> # or install a whole pack: pulse packs install <pack-id>

The stage flips from blocked to healthy without a redeploy. (The Pulse UI plugin catalog does the same thing with a click.)

4 · Trigger the whole chain

pulse events publish --topic oncall.in --value '{"severity":"error","msg":"replica lag exploding"}'
pulse events tail --topic oncall.act.out

The event flows: triage ✓ → reason (model output) → act (tool called). The tool's result is itself an event — auditable, tailable, replayable.

What just happened

This is the full observe → decide → act loop. MCP (Model Context Protocol) is how stages reach the world — tickets, pages, workflows, approvals. Because tool calls emit result events, actions are part of the stream: you can tail them, alert on them, and reconstruct them later. For human approval before an action, an MCP stage can block on a real person — the human becomes a pipeline step.

Troubleshooting

The stage stays blocked after install

Check the tool name in mcpTools matches what the plugin exposes exactly. The pipeline view names the missing tool.

The tool call fails at runtime

The failure lands as an error event with the cause — tail the stage's out topic. Fix the tool's credentials (usually a ${secret:…}) and resend.

Next