Skip to main content
Glama

agent_trace

Retrieve recent runtime traces for an agent, including context loads and close-task writes, to debug context budget issues and rejected writes.

Instructions

Return recent runtime traces (context loads and close-task writes) for an agent from logs/agent-runtime.log. Useful for debugging context budget issues and rejected writes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by trace type
limitNoMax traces to return (default 20)
agent_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the data source and that traces include rejected writes, but says nothing about ordering guarantees, whether results are bounded by log rotation, or any access requirements for reading agent-runtime.log.

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 dense sentences with zero filler; the core action and data source lead, with the use case following. Nothing is wasted.

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

Completeness3/5

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

For a 3-param, no-annotation, no-output-schema tool this is only modestly complete: the agent learns what is returned and why, but not the shape of a trace entry, ordering, or how limit interacts with recency—information that has nowhere else to live.

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 67%; the description's naming of 'context loads and close-task writes' loosely maps to the type enum and 'recent' hints at the limit's temporal role, but it does not explain the enum values' semantics or the default limit behavior beyond what the schema already states.

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

Purpose4/5

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

Names a specific verb (Return), resource (recent runtime traces), scope (for an agent), and even the backing log file, with parenthetical detail on what a trace contains. It is clearly distinct from siblings like agent_status or read_index, though it never explicitly contrasts itself with them.

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

Usage Guidelines3/5

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

The second sentence supplies use cases ('debugging context budget issues and rejected writes'), which implies when the tool is appropriate. However there is no guidance on when NOT to use it, nor a named alternative for adjacent tasks such as checking current state.

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