Skip to main content
Use subagents to keep MCP usage predictable as tool count grows.

Reference architecture

SubagentTools to includeGuardrails
Contactssearch, create, update, tag, mergeblock destructive updates without explicit user confirmation
Conversationslist threads, read messages, send messagesenforce channel and recipient validation
Calendarcheck availability, create appointments, reschedulerequire timezone normalization before booking
Opportunitiesread pipelines, move stages, update valuesrequire reason text for stage/value changes
Paymentsinvoices, transaction lookup, payment statusread-only by default; gate write actions behind approval

Router policy

The router should decide by intent, then hand off to one specialist:
  • Contact lookup, enrichment, segmentation -> Contacts
  • Messaging, inbox summaries, follow-ups -> Conversations
  • Booking or rescheduling -> Calendar
  • Deal progression and forecasting -> Opportunities
  • Billing, invoices, transaction checks -> Payments

System prompt pattern

You are the router. Never call MCP tools directly.
Pick exactly one specialist subagent unless task requires a sequence.
If task is write/destructive, request explicit user confirmation first.
If location is missing, ask for locationId before delegating.

Execution strategy

  1. Router classifies user intent.
  2. Specialist agent calls MCP tools for that domain only.
  3. Specialist returns structured output to router.
  4. Router produces final response and audit trail.

Minimal implementation checklist

  • Build one MCP client wrapper shared by all subagents.
  • Add per-subagent allowlists for tool names.
  • Add approval middleware for write operations.
  • Log all MCP tool calls with locationId, tool name, and status.
  • Add replay tests for common workflows.

Starter template in this repo

Use the included template files as your baseline:
  • mcp/subagents/subagents.config.example.json
  • mcp/subagents/README.md
Last modified on March 6, 2026