Skip to main content
Glama

reflect

Compare expected vs actual outcomes with deviation type to compute reflective signals and a dual-signal score, enabling pattern extraction and belief updates for continuous improvement.

Instructions

Core pedagogical loop. Provide deviation_type and optionally objective_signals; server computes ReflectiveSignals and a dual-signal SCORE. Closes the loop on patterns, beliefs, and v1.4 control-plane nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
pattern_typeNo
actual_outcomeYes
deviation_typeYes
extract_patternNo
confidence_deltaNo
expected_outcomeYes
next_time_recipeNo
objective_signalsNoOptional environment-sourced signals. Recognised keys: tests_delta (int), lint_delta (int, negative = improvement), files_touched (int), predicted_files (int), impact_fidelity (float 0-1), retry_count (int), rollback_count (int). Unknown keys are ignored.
applied_pattern_idsNo
pattern_descriptionNo
verification_resultsNoOptional closeout checks. Each item may reference an existing VERIFICATION node with verification_id, or may be an inline summary with status plus summary/command/result/evidence. Inline summaries are accepted and stored as non-blocking VERIFICATION nodes.
decisions_reconsideredNo
assumptions_invalidatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.3/5.0
Behavior2/5

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

With no annotations, the description is the only signal about effects, but it only says the server 'computes' ReflectiveSignals and a 'dual-signal SCORE' and 'closes the loop.' It never states whether this mutates state, what side effects occur, or what the response looks like.

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

Conciseness3/5

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

The text is brief and avoids repetition, but it relies heavily on undefined jargon such as 'dual-signal SCORE' and 'v1.4 control-plane nodes'. Structure is reasonable for a description of this length though not maximally clear.

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

Completeness1/5

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

For a tool with 14 parameters, no annotations and no output schema, the description omits the required fields (task_id, expected_outcome, actual_outcome), does not specify side effects, and leaves key jargon unexplained. An agent cannot safely call this tool based on the description alone.

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?

The description highlights deviation_type and objective_signals, but the schema has many fields, including required task_id, expected_outcome, and actual_outcome, plus optional fields like extract_pattern and applied_pattern_ids. With only two of ~14 parameters mentioned and no compensation for undefined fields, an agent lacks guidance for constructing a valid request.

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

Purpose3/5

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

The description identifies the resource ('pedagogical loop', patterns/beliefs/control-plane nodes) and the core action (compute ReflectiveSignals and a dual-signal SCORE), but uses domain jargon without concrete verbs like 'record' or 'update.' It does not clearly distinguish this from sibling tools such as record_structured_result or record_belief.

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

Usage Guidelines2/5

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

The description says to provide deviation_type and optionally objective_signals, but gives no guidance on when to use this tool versus alternatives, no prerequisites, and no expected preconditions. There is no explicit when/when-not to use it.

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