Skip to main content
Glama

Inspect the last agent turn

get_last_trace
Read-only

Retrieve the full internal trace of the last agent turn to see every tool call, citation, and data block that produced an answer. Use raw=true to get the untouched A2A response.

Instructions

Return the full detail of the most recent ask_agent turn: every internal tool call the agent made, its citations, structured data blocks, and — with raw=true — the untouched A2A response parts. Use this to see how the agent reached an answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoInclude the untouched A2A JSON result (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already convey readOnlyHint=true, and the description adds meaningful behavioral detail: it returns the full last-turn trace including internal tool calls and citations, and raw=true exposes untouched A2A response parts. This goes beyond what annotations provide, though it does not cover edge cases like absence of a prior turn.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The primary result is stated first, followed by the specific use case. Every word contributes to understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read-only tool, the description covers what is returned and why an agent would use it. It does not describe what happens if there is no prior ask_agent turn, but given the low complexity and annotations, the definition is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single boolean parameter raw is already described as 'Include the untouched A2A JSON result (default false).' The description mostly restates this with 'raw=true' and 'untouched A2A response parts,' adding little semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Return'), a specific resource ('most recent ask_agent turn'), and enumerates the content returned (internal tool calls, citations, structured data blocks). This clearly differentiates it from sibling tools like ask_agent and reset_conversation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit use case: 'Use this to see how the agent reached an answer.' It does not provide exclusion criteria or name alternatives, but the usage context is clear enough for an agent to select it for inspection purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.