Skip to main content
Glama
jefedeoro

JauMemory MCP Server

by jefedeoro

agent_error_learning

Report errors, store solutions, and enforce a two-strike protocol to help agents learn from mistakes and resolve recurring issues before escalation.

Instructions

Enable agents to learn from errors using a 2-strike protocol.

Usage Examples: // Report a new error agent_error_learning({ action: "report", agentId: "backend-dev", errorSignature: "TypeError: Cannot read property 'x' of undefined", errorMessage: "Undefined property access in user service", contextSnapshot: "const name = user.profile.name; // user.profile is undefined", attemptedSolution: "Added optional chaining: user.profile?.name", projectContext: "api-service" })

// Mark error as solved agent_error_learning({ action: "solve", agentId: "backend-dev", patternId: "err-pattern-123", solution: "Always check if user.profile exists before accessing properties", verificationSteps: [ "Run: npm test user.service.spec.ts", "Verify no TypeErrors in logs", "Check user profile endpoint returns 200" ] })

// Record failed attempt agent_error_learning({ action: "fail", agentId: "frontend-dev", patternId: "err-pattern-456", attemptedSolution: "Tried using default values but still crashed" })

The 2-Strike Protocol:

  1. First encounter: Agent gets the error signature to recognize it

  2. Second encounter: Agent must solve it or face consequences

  3. After 2 failures: Error importance increases, agent status may change

Response Types:

  • first_occurrence: New error, pattern ID provided

  • solution_found: Previous solution exists

  • previous_attempts_failed: Shows attempt count (pressure!)

  • new_problem: Similar to other errors but unique

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
agentIdYesAgent ID
solutionNoWorking solution (for solve)
patternIdNoError pattern ID (for solve/fail)
errorMessageNoError message (for report)
errorSignatureNoUnique error identifier (for report)
projectContextNoProject name
contextSnapshotNoCode/context where error occurred
attemptedSolutionNoWhat was tried
verificationStepsNoHow to verify the fix
Behavior4/5

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

No annotations are provided, so the description carries full burden. It clearly describes the 2-strike protocol and response types (first_occurrence, solution_found, previous_attempts_failed, new_problem), which explains behavioral outcomes. However, it does not disclose whether the tool is destructive, requires authentication, or has rate limits, which would elevate this further.

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 well-structured with clear sections (Usage Examples, 2-Strike Protocol, Response Types) and is front-loaded with the core purpose. It is appropriately sized for a complex tool with 10 parameters, though the usage examples could be slightly condensed without losing clarity.

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 tool has 10 parameters, no output schema, and no annotations, the description provides comprehensive guidance: it explains all three actions with concrete examples, the protocol flow, and possible response types. This fully compensates for missing annotations and output schema, making the tool's behavior predictable for an AI agent.

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 already provides 100% coverage with descriptions for all 10 parameters, including enum constraints for 'action'. The description adds value by showing parameter usage in context via code examples, but this is supplemental rather than essential given schema completeness. Baseline 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 clearly states the tool enables agents to learn from errors using a 2-strike protocol. It provides specific verb-resource combinations (report, solve, fail) and distinguishes error learning from sibling tools like memory_stats, list_agents, or search which serve different purposes.

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

Usage Guidelines5/5

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

The description explicitly provides usage examples for each action (report, solve, fail) and clearly outlines the 2-strike protocol with numbered steps. It also describes when each response type occurs, giving agents guidance on interpreting results. There are no sibling tools that overlap in function, so no need for exclusion notes.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jefedeoro/JauMemory-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server