01. The Computer As Tool
Models are starting to move beyond fixed sets of functions. Instead, they can now work with many different tools through a standard called the Model Context Protocol, or MCP. That protocol is an open standard for connecting models with tools. One benchmark includes thirty-three servers and one hundred eighty-eight tools. That is a huge step toward letting a model drive ordinary software built for people. But with so many tools, picking the wrong one can cause real damage. Research shows that inside a model, the choice of tool is carried by a single direction in its internal state. By reading that direction, we can catch mistakes before they happen. Other work studies how to measure a model's confidence when it calls a function. Uncertainty quantification methods help decide whether to trust a call. Some methods cluster function call outputs by their structure. Others select only meaningful tokens for scoring. These steps make the whole system more reliable. That is the trade-off: more tools mean more power, but also more risk. The goal is to make the entire computer act as a universal tool, not just a handful of fixed ones.
Error handling middleware for tool calls catches exceptions and returns a ToolMessage.
@wrap_tool_call
def handle_tool_errors(
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], ToolMessage],
) -> ToolMessage:
"""Convert tool exceptions into ToolMessages the model can handle."""
try:
return handler(request)
except Exception as e:
return ToolMessage(
content=f"Tool error: Please check your input and try again. ({e})",
tool_call_id=request.tool_call["id"],
)
Imagine a master chef in a kitchen with hundreds of utensils hanging on the wall. To pick the right one, the chef doesn't fumble through every drawer—instead, a single mental “handle” flashes in their mind for each tool, guiding their hand directly. This is what modern language models do when they choose which external tool to call. The system’s purpose is to let a model reliably pick the correct tool from a huge set—like opening a specific file, running a calculation, or sending a message—without guessing blindly.
Here’s how it actually works step by step. Inside the model’s internal state—its activation space—each pair of tools has a unique direction, like a labeled arrow. Researchers can read which tool the model is about to choose by using a technique called cosine readout: they compare the model’s current internal state against stored directions for each tool, achieving 61–82% accuracy on the BFCL benchmark, even though the model’s natural output gets only 2–10% right. That means the model already “knows” the right tool deep inside before it speaks. Even more, by adding that direction during generation—adding a tiny nudge—the model switches to the new tool, and its JSON arguments automatically adjust to the new tool’s format. This is like gently nudging the chef’s mental handle so they reach for the whisk instead of the spoon, and then they automatically use the whisk correctly.
The trickiest part is why this works so cleanly. The direction is not just a vague topic signal; random vectors at the same strength give zero switch rate. Instead, the direction is tied to the specific pair of tools—it’s a precise representation learned during pretraining, long before any fine-tuning. Even base models carry these directions, and instruction tuning only teaches the model to say the tool name out loud. Without this internal subsystem, a model might confidently output a wrong tool call—like ordering a money transfer when it meant to check a balance—and the mistake is invisible until it executes, causing real damage. With the readout, we can catch that uncertainty before it happens: queries where the model wavers between two tools fail twenty-one times more often.
The subsystem operates through a layered mechanism that begins with the model’s internal representation of tool choice. Evidence from the “From Text to Voice” study shows that even before a model emits a tool call, the chosen tool is already encoded as a single direction in its internal state; reading this direction via a cosine readout recovers 61–82% accuracy on BFCL, while standard generation yields only 2–10%. This representation is then acted upon by the Activation Steering Adapter (ASA), a training-free, inference-time controller that performs a single-shot mid-layer intervention. ASA uses a router-conditioned mixture of steering vectors with a probe-guided signed gate to amplify the correct tool intent while suppressing spurious triggers. On failure—for example, when the model remains too conservative and fails to enter tool mode, known as the Lazy Agent failure mode—the coupling to the Model Context Protocol (MCP) becomes critical. MCP provides a session-oriented, JSON-RPC framework that negotiates capabilities and invokes external tools under OAuth 2.1‑compliant access control. If the internal steering does not result in a valid tool call, MCP’s negotiation layer can detect the mismatch and fall back to a safe default, though the context does not specify an explicit recovery procedure beyond the access-control enforcement.
The design preserves the invariant that the model’s internal representation of tool necessity is accurate and decodable, even when the behavioral output is unreliable. This is captured in the representation-behavior gap identified by the Lazy Agent failure mode: tool necessity is nearly perfectly decodable from mid-layer activations, yet the model remains conservative in entering tool mode. The guarantee is that ASA can bridge this gap without modifying the model’s weights, so the internal representation remains untouched while the output behavior is corrected. Additionally, MCP’s session-oriented architecture ensures that every tool invocation is bound to a specific context and access rights, providing a write boundary enforced by the OAuth 2.1 framework—any tool call outside the negotiated capabilities is blocked at the protocol level.
The key trade-off is the decision to reject parameter‑efficient fine‑tuning (PEFT) in favor of a training‑free, inference‑time intervention. The ASA paper explicitly dismisses PEFT because it requires ongoing training, maintenance, and risks catastrophic forgetting. Instead, ASA uses only about 20KB of portable assets with no weight updates, achieving a strict tool‑use F1 improvement from 0.18 to 0.50 on MTU-Bench with Qwen2.5-1.5B while reducing the false positive rate from 0.15 to 0.05. The obvious alternative—fine‑tuning the model—would require full‑model or adapter training, incurring high computational cost and the danger of overwriting pre‑learned representations. By rejecting that cost, the design gains portability and avoids forgetting, but it accepts that ASA works only when the internal representation is already correct, which is largely true (cosine readout accuracy is high) but not guaranteed in all multi‑turn loops, where the same intervention shows inconsistent results (matched‑baseline gain or loss of up to 30 percentage points).
A concrete failure mode in this subsystem is a false positive tool call that triggers an irreversible action, such as transferring money or deleting data. The operator would see this as an increase in the false positive rate metric tracked by benchmarks like MTU-Bench. Without ASA, the false positive rate sits at 0.15; after ASA intervention, it drops to 0.05. An operator monitoring the system would observe logs from the MCP client showing an invocation of a tool (e.g., delete_data) that was not intended by the task, accompanied by a confidence score from the probe‑guided signed gate. The signal would be a spike in the “false positive” count in the MTU-Bench evaluation dashboard or, in a production setting, an alert from the OAuth 2.1 layer if the call violates the session’s capability scope—though here the failure is that the call is permitted but wrong. The mismatch between the high internal cosine readout accuracy (61–82%) and the low generation accuracy (2–10%) would be visible in ablation logs, indicating that the representation was correct but the output was not steered.
False Positive Tool Call (Lazy Agent Mode)
- Trigger — Distribution shift, strict parsers, or fragile prompt engineering cause the model to spuriously trigger a tool when none is needed, as identified in the Lazy Agent failure mode — the model remains conservative in entering tool mode yet false positives still occur.
- Guard — The
probe-guided signed gatefrom the ASA controller amplifies true intent while suppressing spurious triggers; it operates as a single-shot mid-layer intervention. - Posture — Fail-closed: the gate is designed to block the spurious call. If the gate functions correctly the tool is never invoked, refusing the execution. If the gate itself fails (e.g., due to an out-of‑distribution input), the false‑positive call may still proceed — the source does not provide a second layer of protection.
- Operator signal — The
false positive ratemetric drops from 0.15 to 0.05 when the gate is active; an unexpected increase in that rate signals the gate’s failure. - Recovery — No retry or backoff is specified in the source. After a false positive call executes, the irreversible action (e.g., sending email, transferring money) cannot be undone automatically; manual rollback is required.
False Negative Tool Call (Failure to Enter Tool Mode)
- Trigger — The model’s conservative behavior (the representation‑behavior gap) prevents it from entering tool mode even when a tool is necessary. Conditions include ambiguous input or domain shifts that the base model’s activation space does not easily decode.
- Guard — The
router-conditioned mixture of steering vectorsin ASA applies a domain‑targeted intervention to push the model into tool mode. It is a training‑free, inference‑time controller that performs a single‑shot activation steering. - Posture — Fail‑soft: if the steering does not succeed, the model remains in text‑only mode and tries to answer without the tool. The task may degrade (e.g., produce a low‑quality or non‑functional output) but the run continues.
- Operator signal — The
tool‑use F1on MTU‑Bench jumps from 0.18 to 0.50 when the guard is applied; a low or stagnating F1 score indicates that the steer failed to activate the correct tool‑calling behavior. - Recovery — No retry is specified. Because ASA is a one‑shot intervention, a failed steer leaves the model in its base state; the operator must manually re‑prompt or apply a different steering vector (not detailed in the source).
Wrong Tool Selection (Picking an Incorrect Tool from Many)
- Trigger — With 188 tools across 33 MCP servers, the model’s internal tool‑choice direction becomes ambiguous. The source shows that queries where the model is unsure between two tools fail 21× more often than unambiguous queries.
- Guard — The
cosine readouttechnique reads the intended tool off the model’s hidden states (achieving 61‑89% top‑1 accuracy across multiple models on a 14‑tool airline domain). When the readout indicates low confidence, the system can flag the call before execution. - Posture — Fail‑closed (if the guard is triggered): the source does not specify an automatic block, but the readout can be used to refuse the call. If the guard is not consulted, the wrong tool is invoked — a fail‑hard scenario because the irreversible action (e.g., booking the wrong flight) may already be executed.
- Operator signal — The
τ‑bench airlineaccuracy sits at 77‑94% for 4B+ models; a drop below that threshold or a high frequency of tool‑name mismatches in logs would indicate the failure. - Recovery — No retry is embedded. The operator must manually revert the erroneous action (e.g., cancel the booking) and re‑submit the query with an explicit tool hint.
Uncertainty‑Gated Execution Without Semantic Token Filtering
- Trigger — An LLM calls a function with low confidence but the uncertainty quantification method used does not filter out semantically meaningless tokens, leading to a falsely high confidence score and an incorrect call.
- Guard — The
logit‑based uncertainty scoresimproved by selecting only semantically meaningful tokens (as described in the UQ for FC paper). In contrast,Semantic Entropy(a multi‑sample method) shows no clear advantage in the function‑calling setting. - Posture — Fail‑soft (if the guard is applied): the system can refuse to execute the call when the uncertainty score exceeds a threshold. If the guard is missing or the token filter is not used, the unconfident call goes through — a fail‑hard outcome.
- Operator signal — An abnormally high uncertainty score that was ignored, or a spike in
false positive rateafter execution. The source also notes that multi‑sample UQ benefits from clustering onabstract syntax tree parsing— absence of that clustering is another silent signal. - Recovery — The source does not specify a retry mechanism. The operator must manually inspect the executed call and, if erroneous, perform a compensating action (e.g., void a transaction).
Steering Instability in Multi‑Turn Agent Loops
- Trigger — The single‑shot activation steering that works well in single‑turn settings becomes unstable in multi‑turn loops, causing a matched‑baseline gain or loss of up to 30 percentage points with no consistent direction.
- Guard — No guard is provided in the source. The paper simply reports the instability and notes that the same intervention is less stable on multi‑turn scenarios.
- Posture — Fail‑soft: the system continues to operate, but task performance may degrade unpredictably (gain or loss). There is no mechanism to fall back to a stable mode.
- Operator signal — Large, random fluctuations in metrics such as
tool‑use F1orτ‑bench accuracyacross turns, with no consistent improvement over the baseline. - Recovery — No recovery logic exists. The operator must disable the steering intervention for multi‑turn tasks or rely on the base model’s self‑perceived baseline, which the source says yields weaker task performance for most open‑source models.