Skip to main content
Glama

run_agent_context_toxicology_scan

Read-onlyIdempotent

Scans agent transcripts, logs, or GitHub Issue comments for reward hacking, context loops, comment bloat, and faucet scraping; returns a diagnostic report and detox checklist.

Instructions

Agent Context-Loop & Reward-Hacking Toxicology Scanner (Free Open-Source Diagnostic Tool): Scans an agent transcript, log, or GitHub Issue comment body for 4 documented failure modes: (1) Unit-Test Reward Hacking (assert True / sys.exit(0) / pytest.skip), (2) Recursive Bliss Attractor Loops (Anthropic Claude 4 System Card Sec 5.5.2), (3) 65KB PATCH Comment-Body Bloat (HTTP 422 Unprocessable Entity), and (4) Testnet Faucet / Wallet Scraping Loops. Returns a structured diagnostic report and the 4-Step Context Detox checklist.

Input Schema

NameRequiredDescriptionDefault
transcript_or_log_textYesAgent log, transcript, or comment body text to audit for context loops or reward hacking

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's added value is the detection taxonomy with citations (Claude 4 System Card Sec 5.5.2, HTTP 422) and the statement that it returns a structured diagnostic report plus a 4-Step Context Detox checklist. It does not describe report structure or handling of very large inputs, which keeps it below a 5.

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

Conciseness4/5

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

Front-loaded with the tool's identity and purpose, and the numbered list of failure modes is dense and scannable. The parenthetical '(Free Open-Source Diagnostic Tool)' and the inline citations are mild marketing/decoration but do not obscure the core signal.

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 one-parameter read-only diagnostic with no output schema, the description covers purpose, detection scope, and a high-level statement of what is returned. The only gap is the unspecified shape of the 'structured diagnostic report', which is acceptable given the tool's simplicity.

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 parameter is well documented in the schema, so baseline is 3. The description implies what patterns are searched for inside the text but adds no format, size, or encoding guidance beyond that.

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?

States a specific verb (Scans) and resource (agent transcript, log, or GitHub Issue comment body) and enumerates the four exact failure modes it detects. No sibling tool in the list does anything comparable, so an agent can select it unambiguously.

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 applicable input contexts (agent transcript, log, GitHub Issue comment body) and the trigger conditions (unit-test reward hacking, bliss-attractor loops, 65KB bloat, faucet scraping) are clearly spelled out. It stops short of naming exclusions or alternatives, but the sibling set contains no overlapping tool, so routing risk is low.

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