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

C2.7/5.0
Behavior2/5

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

Annotations are None, so the description carries the full burden of disclosing behavior. It mentions side effects: it 'publishes the patched strategy version in real time' and 'verifies update against anchor regression', implying mutation and potential versioning. However, it does not disclose whether this is reversible, what authorization is needed, or the impact on existing strategy versions. For a mutation tool, this is a significant gap.

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?

The description is concise, using a clear metaphor and front-loading the main purpose. It is structured with a lead sentence, then a list of steps. It could be more direct, but it is efficient and conveys the workflow in few sentences.

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?

Given the complexity (4 required params, nested objects, output schema), the description is incomplete. It does not explain the expected structure of task_instance or execution_trace, nor what violations should contain. While the output schema exists, the description does not mention what the published version looks like or how the agent will receive confirmation. The lack of parameter explanation is a major gap.

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 description coverage is 0%, so the description must explain the parameters. It does not explain any of the four required parameters (strategy_id, task_instance, execution_trace, violations) beyond their names. It does not specify the structure of the arrays/objects or how they relate to the described behavior. The description's talk of 'root-cause constraint violations' hints at violations but does not define it. This leaves the agent guessing about expected input formats.

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 purpose: it analyzes execution failures, synthesizes repairs, and publishes updated strategies. It uses specific verbs and mentions the resource (strategy). It could better distinguish from siblings like cognitive.verify_strategy or cognitive.record_experience, but the focus on learning from mistakes is distinctive.

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 implies usage after an execution failure ('When an execution fails'), but does not explicitly state when NOT to use it or mention alternatives. It does not guide the agent on prerequisites (e.g., needing a strategy_id) or contrast with similar tools like verify_strategy, which could verify a strategy without patching.

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