$ fssg build --deterministic --validate |

FACET, MCP, JSON Schema, and Workflows: Choose the Right Boundary

FACET

AI infrastructure becomes fragile when four different boundaries are compressed into one word: “tooling.”

A JSON Schema can constrain the shape of arguments. MCP can transport a tool call between a host and a server. A durable workflow can resume long-running execution. FACET can compile request meaning, context layout, policy, and tool authority into a canonical artifact.

These mechanisms overlap at the edges, but they do not do the same job. I use a simple rule: choose a technology by the boundary it can actually enforce, not by the number of features listed in its README.

The four boundaries

Layer Primary question Strongest artifact
JSON Schema / strict structured output Is this value shaped correctly? validated data instance
MCP How does a host discover and call a remote capability? protocol request and response
Durable workflow engine How does execution survive time, failure, and restart? persisted workflow history
FACET Which compiled request, context, tools, and policy are allowed to reach inference and execution? canonical contract and provenance identity

This table is not a ranking. It is a map. Most serious agent systems need more than one row.

JSON Schema validates shape, not authority

Strict structured output is useful. If a model must produce an object with customer_id, amount, and currency, schema validation can reject missing fields, wrong types, and unexpected structure. That removes a large class of parsing failures.

But a valid object is not an authorized operation.

{
  "customer_id": "c-1842",
  "amount": 5000,
  "currency": "USD"
}

The object may satisfy its schema and still violate policy. The customer may belong to another tenant. The amount may exceed the operator's limit. The same request may already have been applied. The tool may be unavailable in this environment.

Schema answers: is this value structurally admissible? It does not answer: may this effect happen now?

I keep schema validation at both sides of the boundary: model output is checked before dispatch, and tool results are checked before they re-enter the loop. I do not promote a schema into an authorization system.

MCP transports capability, not application policy

MCP standardizes how AI applications connect to tools, resources, and prompts. Its current specification gives tools full JSON Schema 2020-12 input and output surfaces, a stateless protocol core, explicit task extensions for long-running work, and stronger authorization infrastructure.

That makes MCP an important interoperability layer. A host can discover a tool and call it without embedding every integration directly.

But discovery is not permission. A tool annotation such as read-only, destructive, or idempotent is useful risk vocabulary; it is still metadata supplied by the server. The MCP maintainers explicitly describe annotations as hints rather than a complete security boundary.

The host still needs to decide:

  • whether this user may reach this server;
  • whether this tool may be exposed for this task;
  • whether these arguments are allowed under current business policy;
  • whether approval is required;
  • how the effect is identified, audited, retried, or compensated.

MCP answers: how can the capability be described and invoked? It does not, by itself, compile the application's authority model.

Workflow engines preserve execution, not request semantics

Durable workflow systems solve another hard problem: code runs for minutes, days, or months; workers crash; APIs time out; processes restart; a human approval arrives later. Persisted history and replay let the workflow continue without reducing the process to one fragile request.

This is where retries, timers, compensation steps, and resumable orchestration belong.

Yet a durable workflow can durably execute the wrong contract. Persistence does not prove that the model saw the right context, that a tool schema matched the policy version, or that an adapter preserved canonical names. It preserves control flow and state transitions according to the workflow definition.

A workflow engine answers: how does this process continue safely through time and failure? It does not define the semantic contract of the model request.

FACET compiles the request boundary

FACET occupies the missing layer between application state and provider payload.

The compiler resolves imports, validates types, evaluates dependencies, allocates context through the Token Box model, exposes declared interfaces, evaluates policy, and emits canonical JSON with stable document and policy identities. The host still calls the provider and owns external side effects.

That limitation is deliberate. FACET does not replace MCP transport or a durable workflow runtime. It gives both of them a stricter input.

A useful composition looks like this:

application state
      ↓
FACET contract + typed runtime input
      ↓
canonical request + policy/provenance identity
      ↓
provider call and model proposal
      ↓
FACET/host authorization boundary
      ↓
MCP tool transport
      ↓
durable workflow step, effect record, retry or compensation

Each layer keeps one responsibility. The FACET contract decides what may be visible and admissible. MCP carries the invocation. The workflow engine persists the process. JSON Schema checks data at the seams.

This extends the canonical FACET language pillar without asking FACET to become an agent framework. The broader AI engineering runtime remains the system that owns state, checkpoints, traces, and rollback.

A decision matrix

Requirement Start with Add when needed
Return a typed object from one model call strict JSON Schema FACET when context, tools, or policy must also be compiled
Connect an assistant to many independent services MCP FACET/host policy for exposure and call authorization
Run a multi-day process with retries and approvals durable workflow FACET for model-request identity; MCP for remote tools
Reproduce which contract and policy produced a request FACET workflow history for lifecycle continuity
Prevent duplicate external effects host/workflow idempotency FACET provenance for proposal and policy identity
Keep provider adapters semantically boring FACET canonical JSON MCP where capabilities cross process or organization boundaries

The wrong architecture begins with replacement claims: “MCP is the agent runtime,” “JSON Schema makes the call safe,” “the workflow engine makes inference reproducible,” or “FACET replaces orchestration.” Each sentence assigns a guarantee to the wrong layer.

The minimum useful stack

For a small read-only assistant, strict schemas plus a narrow MCP server may be enough. Adding a compiler and a durable workflow would create ceremony without reducing meaningful risk.

For an effectful production agent, I want four explicit artifacts:

  1. Contract identity — which FACET document, compiler version, runtime inputs, and policy produced the request.
  2. Protocol identity — which MCP server, tool, schema, and transport request carried the capability call.
  3. Effect identity — which business operation is being attempted, with an idempotency key and current state.
  4. Workflow identity — which persisted process owns retries, approval, compensation, and completion.

These identities should correlate, but they should not collapse into one opaque “agent run ID.” When an incident occurs, I need to know whether the defect came from request construction, protocol mapping, business authorization, or workflow recovery.

Where the comparison stops

This is an architectural comparison, not a performance benchmark. It does not claim that FACET, MCP, or any workflow engine is faster or more production-ready than another. Their scopes differ too much for that sentence to be useful without a concrete workload and reproducible measurements.

The stronger conclusion is narrower: reliability improves when every layer states what it guarantees and refuses guarantees it cannot enforce.

I do not want one universal agent framework. I want a stack of small, honest boundaries: schemas for shape, MCP for capability transport, workflows for durable time, and FACET for compiled meaning and authority around inference.

That architecture is less magical. It is also much easier to debug.

Sources

FACET AI CLI Terminal
facet@ai:~$