Skip to main content
Glama
Jau-app

JauMemory MCP Server

Official
by Jau-app

agent_error_learning

Report agent errors, record solutions, and track failed attempts with a 2-strike protocol to help agents learn from mistakes and avoid recurrence.

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
errorSignatureNoUnique error identifier (for report)
errorMessageNoError message (for report)
contextSnapshotNoCode/context where error occurred
attemptedSolutionNoWhat was tried
projectContextNoProject name
patternIdNoError pattern ID (for solve/fail)
solutionNoWorking solution (for solve)
verificationStepsNoHow to verify the fix
Behavior4/5

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

With no annotations, the description carries the full burden. It explains response types (first_occurrence, etc.) and consequences (agent status may change). This provides good behavioral context beyond the basic read/update intent, though it omits details like data persistence or limits.

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 headings and code examples, making it easy to scan. While lengthy, the content is justified for a tool with 10 parameters and a protocol. Every section adds value, though some repetition exists.

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

Completeness4/5

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

Given the complexity (10 parameters, no output schema), the description covers the protocol, usage patterns, and response types. It lacks details on return values or error handling, but for a learning tool, it provides sufficient context for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 10 parameters have descriptions in the schema (100% coverage). The description adds value by showing how parameters are used together in examples (e.g., report uses errorSignature, solve uses patternId). This clarifies parameter relationships beyond individual schema descriptions.

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's purpose: 'Enable agents to learn from errors using a 2-strike protocol.' It specifies three distinct actions (report, solve, fail) and provides usage examples, distinguishing it from sibling tools focused on memory or collections.

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?

The description provides explicit usage examples for each action and explains the 2-strike protocol, giving clear context for when to use each action. However, it does not explicitly state when not to use the tool or compare with alternatives, though siblings are clearly differentiated by purpose.

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/Jau-app/JauMemory-mcp-server'

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