Integration Pattern Selection

Decision Flow

Does LLM reasoning determine which action to take?
  NO → I1 (Direct API Call): synchronous HTTP, no model involvement

  YES:
    Does a CLI already exist for this tool?
      YES → I4 (CLI Invocation) first — zero schema overhead

    How many tools, and are they shared across agents?
      1–5 tools, single agent → I2 (Function/Tool Call)
      5–20 tools shared across agents → I2 + I3 hybrid
      20+ tools → I3 (MCP Server) with gateway + dynamic discovery

    Do multiple agents from different vendors need to coordinate?
      YES → I5 (Agent Card) for discovery + I6 (A2A Delegation) for execution

Cost Reality

PatternContext overheadNotes
I1 Direct APINoneModel not involved; deterministic
I2 Function CallSchema tokens (per tool)Each tool schema costs attention budget
I3 MCP ServerHighGitHub MCP alone: 40,000–55,000 tokens/request
I4 CLI InvocationNear zeroExisting CLI; command string only
I5 Agent CardMinimal (JSON descriptor)Discovery only; no execution cost
I6 A2A DelegationPer sub-taskFull task delegation; cost of the delegated agent

Design tool budgets before choosing integration patterns. 4–5 MCP servers = 60,000+ context tokens on schemas alone. Apply V13 (Tool Budget) before adding I3 servers.