Skip to main content
Glama

check_code_reflex

Checks proposed code against learned bug and antipattern memories, returning avoid, safe, or neutral to guide AI coding agents before execution.

Instructions

Instant (<1ms) associative memory check of proposed code against past rewarded or punished bug patterns. Returns 'avoid', 'safe', or 'neutral'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe proposed code snippet, function, or diff to evaluate.
contextNoOptional context or filename describing the task.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose useful traits: sub-1ms latency and the three possible verdicts ('avoid', 'safe', 'neutral'), implying a non-mutating check. It never states that it has no side effects, what happens with an empty/unpopulated memory, or how reliable the verdict is, which are meaningful gaps for a zero-annotation tool.

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 tight sentences, front-loaded with the latency figure and the core action, then the return values. Every clause earns its place with no repetition.

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?

With no output schema, the description usefully enumerates return values, and the two parameters are simple and fully documented in the schema. But with no annotations, it still leaves behavior (side effects, behavior on empty memory, trust in the verdict) unexplained, so it is adequate rather than 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 description coverage is 100% for both parameters (code and optional context), so the schema already does the work. The description adds no format or size hints beyond 'proposed code', so the baseline 3 applies.

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?

The description gives a specific verb ('check') and resource ('associative memory of proposed code against past rewarded or punished bug patterns'), which is clearly distinct from the sibling write tool remember_code_outcome. It stops short of naming a sibling to route away from, so it is clear but not fully differentiated.

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?

Use is implied: you call this with proposed code to see whether past rewarded/punished patterns suggest avoid, safe, or neutral. However, there is no explicit when-to-use/when-not-to-use guidance and no routing against the overlapping query_associative_memory or remember_code_outcome siblings, which an agent would need to choose correctly.

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