Skip to applet controls
← AI Playgrounds
Language

Agent Tool Use and Context Protocols

Inspect the boundary between model output, a structured tool call, runtime validation, authorization, deterministic execution, returned observation, context update, and stopping. Every executable transition is produced by the frozen deterministic teaching policy and in-memory tool world.

AI Playgrounds
Evidence boundary.

This prototype uses a transparent deterministic teaching policy and frozen in-memory tools. It is not a frontier agent, does not expose hidden reasoning, and performs no real network, mail, calendar, or filesystem action.

GOAL

1 · Proposemodel-side output
2 · Validatetool + schema
3 · Authorizeprincipal permission
4 · Executedeterministic tool
5 · Observeappend context

Context ledger

Candidate model outputs

Tool catalog

Availability, schema validity, authorization, and execution are separate states.

MCP envelope inspector

Version-scoped to MCP 2026-07-28. The abstract agent loop remains protocol-neutral.

Trace timeline

Quick Assign · QA-AGENT-01 · 10–15 min

A proposed call is not an executed action

Use one Guided Challenge and trace the candidate action through the actual runtime gates before deciding whether anything executes.

Use the existing Guided Challenge for the run/reveal step. Responses stay in this browser unless you deliberately copy or print them.

State snapshot appears here.

Before you read

An agent can propose an action, but a runtime decides whether anything executes. Follow the proposal through tool lookup, argument checks, permission, execution, observation, context update, and stopping.

Terms used in this explanation

Proposed action
Structured output requesting a tool call or stop.
Tool schema
The declared name, fields, and value types for a tool.
Validation
Checking whether a proposal matches that schema.
Authorization
Checking whether the acting principal has permission.
Observation
Data returned after a tool executes.
Provenance
A record of where data or context came from.
Context update
Adding selected observations to the next decision state.
Stop condition
A rule that ends the loop when the goal is met or progress is unsafe.

1. A proposal is not execution

The model-facing step produces structured text: a tool name and arguments, or a stop action. That proposal has no external effect by itself.

The runtime first checks whether the named tool exists and whether the arguments match its declared schema.

2. Validity and permission answer different questions

Validation asks whether the call is well formed. Authorization asks whether this principal may perform it in this context.

A call can be valid but denied, or invalid before permission is even considered. Keeping the gates separate makes the failure legible.

3. Execution returns an observation

Only a proposal that passes the required gates reaches the simulated tool. Its result is recorded as an observation with provenance.

An observation can contain untrusted text. Its content does not inherit the authority of the runtime or user instruction.

4. Context guides the next decision

The runtime selects what to add to context, preserving the source of each fact. The next proposal is based on that updated state.

The loop stops when the goal is satisfied, a required action is denied, the proposal is invalid, or no safe progress remains.

What this model leaves out

This is a deterministic, local simulation. It does not call real services, authenticate real users, or create external side effects.

Production agent systems also need secure credential handling, rate limits, retries, audit logs, sandboxing, human approval, and defenses against untrusted content.

For teachers

Curriculum: Structured tool calls, schemas, validation, authorization, observations, provenance, context updates, prompt injection boundaries, and stopping.

Pre-exploration prompts

  • Does writing a tool name cause the tool to run?
  • What is the difference between a malformed call and a forbidden call?
  • Can text returned by a tool grant itself authority?

Post-exploration prompts

  • Find the first gate that rejects the invalid call.
  • Switch principals. Which part of the trace changes?
  • Inspect the injection scenario. Which text is data?
  • Explain why the termination scenario should stop.

Misconceptions to test: a model proposal is execution; schema validity implies permission; tool output is trusted instruction; more context is always better; an agent should keep calling tools until it is forced to stop.

♿ Text and keyboard support

Text and keyboard support

Use Tab and Shift+Tab to move through controls. Use Enter or Space on buttons and arrow keys on sliders or select controls.

Read the current model state in the applet’s text-state panel.

Important results are available as text and do not depend only on color or motion. This does not replace a full human assistive-technology audit.

↑ Back to the applet controls

Guided Challenge · predict before reveal

Accessible state

Complete text-equivalent state for the current deterministic trace.

Check your model of the agent loop

Key distinctions

Model output: text or structured data proposed by the model-side policy. Tool call: an executable action candidate containing a tool name and argument object. Schema-valid: the arguments satisfy the tool's declared structural constraints. Authorized: the current principal is permitted to invoke the tool. Executed: the runtime actually invoked the deterministic tool implementation. Observation: structured data returned by execution. Context update: appending that observation with provenance so it can affect a later decision. Termination: stopping when the goal conditions are satisfied rather than making another call.