Skip to main content
Glama

check_code_reflex

Read-only

Check proposed code against remembered bug and antipattern reflexes to get an avoid, safe, or neutral verdict.

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

A4.1/5.0
Behavior4/5

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

Annotations already mark the tool as readOnly, and the description adds meaningful behavioral detail beyond that: the operation is instantaneous (<1ms), memory-based, and returns one of three classification tokens. This gives the agent a clear picture of what happens during invocation without contradicting the annotations.

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 one tight sentence that front-loads the core action, adds a performance guarantee, and finishes with the exact output vocabulary. Every word earns its place; there is no fluff or redundancy.

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

Completeness5/5

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

Given the simple two-parameter schema with full descriptions Hubbard, the readOnly annotation, and the absence of an output schema, the description is complete: it names the input type, the behavior, and all possible return values. An agent has enough information to invoke the tool correctly.

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?

The input schema covers both parameters fully (100% coverage) with descriptions for 'code' and 'context'. The tool description does not add new parameter-level semantics beyond what the schema already provides, so a baseline score of 3 is appropriate.

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 uses a specific verb ('check') and a specific resource ('proposed code against past rewarded or punished bug patterns'), and clearly distinguishes this from the sibling memory-management tools by emphasizing the reflexive, instant associative-memory evaluation. It also states the exact return values ('avoid', 'safe', or 'neutral'), making the tool's purpose immediately unambiguous.

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 description implies the tool is for checking proposed code before using it, but it does not explicitly state when to prefer this over query_associative_memory or other siblings. There are no exclusion criteria or alternative routing cues, so the agent must infer usage context from the tool name and sibling list.

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