Skip to main content
Glama

detect_context_breaches

Scan traces for token usage exceeding context window thresholds to catch overflows that cause truncation or degraded performance.

Instructions

Scan for traces where token usage exceeds a context window threshold.

Default: 256K tokens. Set check_per_generation=true to check if any SINGLE generation exceeds the limit (not just trace aggregate). Catches context window overflow causing degraded performance or truncation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
projectNo
end_dateNo
thresholdNo
start_dateNo
time_rangeNo
check_per_generationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the default threshold (256K tokens), explains the difference between aggregate and per-generation checking, and states the intended outcome (catching overflow). It does not describe return format or other potential side effects, but for a detection tool, this is reasonably transparent.

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?

The description is concise and front-loaded, with the main purpose in the first sentence followed by specific, relevant details. There is no redundant or superfluous text.

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

Completeness2/5

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

The tool has 7 parameters and no annotations, and the description covers only the core detection logic. It lacks crucial information about filter parameters (tags, project, dates) and does not clarify how these interact. While output schema exists, the description is incomplete for a tool with this complexity.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explains 'threshold' and 'check_per_generation', but leaves the other five parameters (tags, project, start_date, end_date, time_range) entirely unexplained. Their names are somewhat self-explanatory, but the semantics of date filters and time_range are not addressed.

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 clearly states the tool's function: scanning for traces where token usage exceeds a context window threshold. It uses specific verbs and resources, and the unique focus on context window overflow distinguishes it from sibling tools like detect_failures or find_slow_traces.

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 provides clear context for when to use the tool (to catch context window overflow causing degraded performance or truncation) and explains the default threshold and the per-generation check flag. However, it does not explicitly mention alternatives or exclusion criteria, so it falls slightly short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DrishtantKaushal/LangfuseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server