Skip to main content
Glama

trw_learn

Persist engineering discoveries with context and tags to share knowledge across AI agents, preventing repeated mistakes.

Instructions

Persist a non-obvious discovery so future agents inherit the finding.

Use when:

  • You just found a root cause, gotcha, or durable pattern worth remembering.

  • Capture it the moment you validate an approach that prevents repeated mistakes.

  • You hit an architecture constraint that is not obvious from reading the code.

Only record learnings that:

  • prevent repeated mistakes,

  • change future implementation/debugging/review behavior,

  • are specific enough to recall later. Routine observations ("I read the file", "the test passed") degrade recall quality.

Required:

  • summary: one-line headline.

  • detail: full finding with context, symptoms, and why it matters.

Recommended:

  • tags: keywords for trw_recall filtering. Accepts a JSON list (["a","b"]) OR a comma/whitespace-separated string ("a,b c").

  • impact: 0.0-1.0; high values surface more often.

Advanced (auto-detected if omitted):

  • shard/source/client/model/type/domain/phase/team/protection metadata.

  • scope: write-tier override (PRD-CORE-185). "auto" (default) routes portable learnings to the machine-local user tier when a user-scope store is present, else the project tier; "project"/"user" force it. Most learnings need only summary and detail. Adding tags and impact improves recall precision. All other fields are auto-detected.

Output: LearnResultDict with {id: str, status: "saved"|"deduped"|"error", dedup_match?: dict, ceremony_hint?: str}.

See Also: trw_recall, trw_learn_update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
typeNopattern
scopeNoauto
detailNo
domainNo
impactNo
expiresNo
summaryNo
evidenceNo
model_idNo
shard_idNo
task_typeNo
assertionsNo
confidenceNounverified
nudge_lineNo
source_typeNoagent
team_originNo
phase_originNo
client_profileNo
phase_affinityNo
protection_tierNonormal
source_identityNo
consolidated_fromNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly indicates this is a write operation (persist), describes the output status (saved/deduped/error), and mentions auto-detection of metadata. It could explicitly state idempotency or deduplication behavior, but it does cover the main behavioral aspects. Score 4 for good but not exhaustive transparency.

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 relatively long but well-organized into sections (purpose, use-when, only-record, required, recommended, advanced, output). It is front-loaded with the purpose and usage conditions. Every sentence adds value, and the structure aids readability. Could be slightly more concise, but it remains effective. Score 4.

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 23 optional parameters and no output schema, the description covers the tool's purpose, usage guidelines, key parameter semantics, auto-detection behavior, output format, and related tools. It is sufficiently complete for an agent to understand when and how to invoke the tool. Score 4.

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?

With 0% schema description coverage, the description must add meaning beyond parameter names. It does: it explains that `summary` and `detail` are required, `tags` accepts JSON list or string, `impact` is 0.0-1.0, and `scope` has auto/project/user options. It instructs that most other fields are auto-detected. Although not all 23 parameters are individually described, the description prioritizes the most important ones and covers their semantics well. Score 4.

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 states 'Persist a non-obvious discovery so future agents inherit the finding.' It uses a specific verb ('persist') and resource ('non-obvious discovery'), and it distinguishes the tool from siblings like `trw_recall` (retrieve) and `trw_learn_update` (update). The purpose is crystal clear.

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 provides explicit 'Use when' conditions and a list of what qualifies as a valid learning. It also specifies what not to record ('Routine observations...'). It includes 'See Also: trw_recall, trw_learn_update' to guide alternative tool selection. This is exemplary usage guidance.

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/wallter/trw-mcp'

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