Skip to main content
Glama

cognitive.learn_from_mistake

Online Real-Time Error Reflection & Strategy Patching.

When an execution fails, analyzes root-cause constraint violations, synthesizes new exception cases and repair procedures, verifies update against anchor regression, and publishes the patched strategy version in real time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
violationsYes
strategy_idYes
task_instanceYes
execution_traceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must disclose behavior itself. It reveals that the tool publishes patched strategy versions and verifies against anchor regression, which implies a mutating side effect. However, it does not state permissions, reversibility, or what happens to existing strategy versions, leaving behavioral transparency incomplete.

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 description is front-loaded with a title-like first sentence, but it repeats 'real-time' and uses a dense multi-clause second sentence. It is informative but could be trimmed without losing meaning.

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?

For a tool with four required parameters, two nested objects, zero annotations, and a potentially mutating action, this description omits parameter semantics and side-effect details. The process overview helps, but an agent would still lack key details for safe invocation.

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 coverage is 0%, so the description must explain the four required parameters. It references 'strategy' and 'constraint violations' (mapping to strategy_id and violations) but never mentions task_instance or execution_trace by name or purpose, leaving half the parameters unexplained.

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 clearly states the tool's function: when an execution fails, it analyzes violations, synthesizes repair procedures, verifies and publishes a patched strategy version. This distinguishes it from siblings like verify_strategy or record_experience, though it doesn't explicitly name alternatives.

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?

It provides a clear trigger context ('When an execution fails') and a real-time patching workflow, which tells an agent when to invoke it. It does not name alternative tools or explicit exclusions, so it stops short of full guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources