Examples
Three common flows illustrated as agent ↔ MCP interactions. Each step uses the real schemas documented in Tools and Prompts and resources.
1. Create a pipeline from an intent
Operator (in chat): "Start tracking @growth_dr and build me analytical drafts for each post."
- Agent invokes
create_pipeline_from_intentwith:{"handle": "growth_dr","intent": "Track this competitor and turn their high-engagement posts into analytical drafts we can refine.","tone": "analytical","idempotency_key": "init-growth-dr-2026-05-16-001"} - MCP responds with
{ pipeline_id, run_id }. - Agent confirms to the operator with a link to the pipeline in the UI or the ID to use with
read_inbox.
Limitation: this tool creates pipelines with
source=social,kind=prose,scope=per_post. For--auto-fanout, anothersource,kind=structuredor digest scopes, you need to use the CLI or the UI.
2. Diagnose a pipeline that is not producing
Operator: "Why hasn't
pp_a1b2c3been giving me drafts for 2 days?"
- Agent invokes
diagnose_pipelinewith{ "pipeline_id": "pp_a1b2c3" }. - MCP responds with shape:
{"status": "running","last_run": { "id": "run_5xyz", "status": "failed", "error_code": "credential_dead" },"suggested_action": "rotate_credential","suggested_endpoint": "connect_account"}
- Agent explains to the operator: "The adapter ran out of live credentials for this account. Let me walk you through the rotation wizard."
- If the operator pastes fresh credentials into the chat (not recommended but possible), the agent invokes
connect_accountwith{ platform, handle, auth_material, idempotency_key }. The probe runs synchronously and the response indicates whether the credential works.
3. Refine pending drafts and publish
Operator: "Tell me what's ready in the inbox for
pp_a1b2c3and refine the long ones for me."
- Agent invokes
read_inboxwith{ "pipeline_id": "pp_a1b2c3" }. - MCP returns the inbox rows. The agent reviews the
previewvalues and detects drafts longer than 280 characters. - For each one, the agent invokes the
refine_postprompt with:The prompt returns a narrated workflow — the agent follows it: reads the artifact via{"artifact_id": "rf_4f5g","goal": "shorter and punchier, keep the numbered-list hook"}artifact://rf_4f5g, decidesrefinement_type=shorter, triggers the refinement, polls, and finally invokespublish_artifacton the child if the operator approves. - The agent presents the operator with the list (originals + variants) and asks which ones to publish — one by one, not in a silent batch.
4. Drive a drafting session end-to-end
Operator: "Open a session, drop the top 3 posts from
pp_a1b2c3, and try two variants — one thread, one long-form."
- Agent invokes
session_createwith{ "name": "growth_dr · 2026-05-23" }. MCP returns the new session id. - Agent invokes
read_inbox/list_postsagainstpp_a1b2c3and picks the 3 highest-engagement posts. - For each post, agent invokes
session_add_itemwith the snapshot fields (sourceKind: "social",externalItemId,title,snippet,capturedAt,metrics,raw). - Agent invokes
session_add_varianttwice:{ "sessionId": "...", "presetId": "social-thread", "prompt": "Thread on growth tactics, hook-driven", "style": "punchy, numbered", "typeTag": "thread" }{ "sessionId": "...", "presetId": "long-form", "prompt": "Long-form post, analytical takeaway", "style": "professional, paragraph", "typeTag": "long-form" } - Agent invokes
session_generate_allwith{ "sessionId": "..." }. MCP queues both variants; each generation appends avariant_round. - Agent invokes
session_getto read the latest rounds and presents both variants to the operator. - Operator picks the thread; agent invokes
session_export_variantwith{ sessionId, variantId, format: "markdown" }to record the export event.
Sessions don't publish. Exporting records an event and returns the round text — what happens next (paste into your destination, schedule via another tool) lives outside Whet.
Patterns to avoid
- Do not invoke
publish_artifactin batch without confirmation. Each publish is an explicit operator intent. An agent that publishes everythingreadywithout asking breaks the product contract. - Do not re-implement ingestion from the agent. If you need more data, use
list_postsor create another pipeline — do not try to fetch from upstream platforms on your own. - Do not store the
idempotency_keyin the chat. Generate it on the agent side with a UUIDv4 and discard it after the call. Reusing the same key against another pipeline confuses the idempotent replacement. - Do not assume
create_pipeline_from_intentcan modify an existing pipeline. The tool creates or resumes the same pipeline when theidempotency_keyis reused. For configuration changes, you need to go to the UI or the CLI.
Cost model
Each tool call consumes resources from the operator's deployment (Postgres queries, LLM calls in many cases). Whet does not bill per MCP call — the cost is in the retainer/setup fee. If you build an agent that consumes intensively, respect the Agent API rate limits (documented in Integrations · Errors).