Skip to main content
Glama

Self-improve: distill lessons from the journal

refine

Review past errors and failed audits, distill evidence-backed lessons, and inject them into future work to fix recurring problems.

Instructions

The self-improvement loop (inspired by continual-harness agents). Call it in two steps. Step 1 - call WITHOUT lessons: it returns review material (recent errors, open problems, failed audits, repeated tool patterns, existing lessons). Study it and distill what should be done differently next time. Step 2 - call WITH lessons: each lesson must be small, actionable and evidence-backed (cite the journal events that prove it). Lessons are injected into future get_context recaps and work packages, so they actually change behavior. Use scope 'global' for lessons that apply to all future projects (e.g. 'Windows needs taskkill for process trees'), project scope for project-specific ones. Do NOT record duplicates of existing lessons. Good moments to refine: after a failed audit was fixed, after a tricky bug, at project completion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lessonsNoOmit on the first call to receive review material
projectIdNo
deactivateLessonIdsNoIds of existing lessons that turned out wrong or obsolete
Behavior5/5

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

The description discloses important behavioral traits: step 1 returns review material, lessons are injected into future get_context recaps and work packages, and scope affects applicability. With no annotations provided, this detailed behavioral context fully compensates.

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

Conciseness5/5

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

The description is well-structured, starting with the overall concept, then breaking down the two steps, followed by scope guidance, duplicate warning, and ideal timing. Every sentence adds value, making the length appropriate for the tool's complexity.

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?

Despite having no output schema, the description sufficiently explains what step 1 returns and what step 2 accomplishes. It covers the full workflow, lesson requirements, scope options, and ideal usage moments, making the tool completely understandable and actionable.

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?

The description provides deep detail on the 'lessons' parameter, including formatting, evidence requirements, and scope semantics. However, 'projectId' and 'deactivateLessonIds' are not explicitly addressed; the schema covers one, but projectId lacks any explanation, leaving slight gaps.

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 identifies the tool as a self-improvement loop that distills lessons from the journal, with a specific two-step call pattern. It distinguishes this from sibling tools by focusing on iteratively improving behavior from past events.

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?

Explicit guidance is provided on when to call the tool ('after a failed audit was fixed, after a tricky bug, at project completion') and how to use it in two distinct steps. It also warns against recording duplicate lessons, giving clear do's and don'ts.

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/DPGS-oss/app-factory-mcp'

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