MCP Eval Round-Trip: agent → affordance gate → FSI worker

MCP Eval Round-Trip: agent → affordance gate → FSI worker A sequence diagram generated by Archify. tools/list visible tools only send_fsharp_code checkToolCallAllowed Ready OK eval code (;; txn) emit events result / error tool result Call Gate Eval AI Agent · MCP client · Sequence participant AI Agent MCP client MCP Server · :37749 · Sequence participant MCP Server :37749 Gate · affordance check · Sequence participant Gate affordance check FSI Worker · session process · Sequence participant FSI Worker session process SSE · event stream · Sequence participant SSE event stream Legend request return security async trace default message

Round-trip

  • • The agent only ever sees tools valid for the current session state
  • • send_fsharp_code executes in the session's isolated FSI worker
  • • Each ;; is a transaction boundary — a failure discards only that statement

Gate fails closed

  • • tools/call is checked against the affordance declaration table
  • • A tool missing from the current state is rejected before eval
  • • Always-available tools (get_session_status, list_sessions) bypass the state gate