Get Context Loss
get_context_lossExplain what an agent's context lost between two LLM calls of one session.
Use it when get_agent_trace shows a context drop (or a context_rot / CF-03
finding): the output lists the tokens before and after, whether the system
prompt survived, which parts of the context shrank, the summary that replaced
the dropped history (when one can be read) and the messages involved. The
second span has to belong to trace_id; the first may sit in an earlier
trace of the same session.
trace_id: the trace holding the later call (from get_agent_trace).
from_span_id: the earlier LLM call's span id, as the Context drops list or the
Context usage table of get_agent_trace names it.
to_span_id: the later LLM call's span id, in trace_id.
workspace: optional workspace id, name, or org-name/workspace-name when
the same name occurs in two of your orgs (defaults to your default;
use list_workspaces to discover them).
Example:
Why did the context drop at that call?
{
"name": "get_context_loss",
"arguments": {
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"from_span_id": "00f067aa0ba902b7",
"to_span_id": "b7ad6b7169203331"
}
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trace_id": "<trace_id>",
"from_span_id": "<from_span_id>",
"to_span_id": "<to_span_id>"
},
"name": "get_context_loss"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | Yes | ||
| workspace | No | ||
| to_span_id | Yes | ||
| from_span_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |