Skip to main content
Glama

Append Learning

append_learning

BEFORE COMPOSING YOUR BATCH, filter each candidate entry. A learning is ONLY:

  • A reusable rule about how the agent should run, that applies to every future firing, not just this one.

A learning is NOT (these are the most common mistakes — produce zero of these):

  1. Per-entity / per-contact facts. Anything naming a specific company, person, deal, or URL. Examples that DO NOT belong here: "Heitman LLC (heitman.com) is a real estate firm in Chicago", "Jamestown Management hired a new CFO", "Alice Chen's first name is 'Alice'", "ExampleCo: 200 waitlist, 30 live users". → Use track_prospects(agent_id, items=[...]) for per-entity lifecycle tracking, OR → update_workspace(section='outputs', key='<your_list>', value=[...]) to store as an agent deliverable.

  2. Per-run summaries. Anything describing what happened on a specific date or run. Examples: "Follow-up run 2026-04-27: 0 people in 'messaged' stage", "Apr 23 scan: same source returned, no new angles". These are auto-saved to the agent's run history every run — don't duplicate them here.

  3. General user preferences. "User wants concise emails", "user prefers Tuesday meetings". → Use save_memory.

Valid learnings look like rules-of-thumb, not observations. They're short prose, no proper nouns, no dates, no per-entity data. Good examples:

  • "PostHog returns 1-day data, not an error — if the query returns one row it's complete, not partial."

  • "Internal team syncs rarely produce postable ideas — skip quickly to save Tavily budget."

  • "r/SaaS posts about LinkedIn automation pain are strong leads."

  • "Tavily score < 0.09 against generic signal_keyword queries is reliably tangential — keep min_score=0.09."

If you cannot rewrite your candidate entry into a rule-of-thumb shape without naming a specific entity, date, or run number, it doesn't belong here — store it via track_prospects or update_workspace instead.

USAGE

Pass learnings=["...", "..."] to add one or more new entries in one call. The whole batch is atomic — either all entries are appended or none are (see "Cap behavior" below). Singleton case is learnings=["..."]. Batching is strictly preferred over multiple single-entry calls: one round-trip per run is dramatically cheaper in latency and tokens than one round-trip per insight.

Pass replace_with=[...] to atomically replace the full list — use this when the prior call returned a "cap reached" ModelRetry asking you to consolidate.

Scope: per-agent and persistent. Distinct from save_memory (per-user preferences).

CAP BEHAVIOR

The list is capped at 25 items. If a batch would push the list over the cap (current_count + batch_size > 25), the WHOLE batch is rejected via ModelRetry asking you to consolidate first via replace_with. After consolidating, re-submit your full batch — no need to track which entries "landed" since none were stored on the rejected call. Consolidate by DROPPING entries that match the anti-examples above (per-entity facts, per-run summaries), not by reshuffling — the cap is a forcing function for hygiene, not a length limit on the same content. Dict with success, agent_id, and the new learnings count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesID of the agent
learningsNoNew learning entries to append in one batch (mutually exclusive with replace_with)
replace_withNoFull replacement list for consolidation (mutually exclusive with learnings)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "description": "ID of the agent",
      +  "type": "integer"
      +}
    • removedInput schema / properties / task_id
      Removed value: -{
      -  "description": "ID of the task",
      -  "type": "integer"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "task_id"
      -]New value: +[
      +  "agent_id"
      +]
  2. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=false), the description discloses significant behavior: the list is capped at 25, over-cap batches are rejected atomically via ModelRetry, replace_with atomically replaces the full list, and both learnings and replace_with batches are all-or-nothing. It also explains persistence scope (per-agent) and the return value shape. Nothing in the description contradicts the annotations.

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 long but highly structured with clear sections: a summary, explicit anti-examples, valid examples, usage, and cap behavior. The core action is front-loaded in the first sentence, and every subsequent section earns its place by preventing the exact mistakes an agent would otherwise make. The formatting makes the density navigable rather than bloated.

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's complexity, cap semantics, and lack of an output schema, the description is complete: it covers valid entries, invalid entries, routing alternatives, batching atomicity, cap-rejection behavior, consolidation guidance, and return value summary. An agent has everything needed to decide whether to call it and how to structure the arguments successfully.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds essential semantics beyond the raw parameter names: learnings is for appending a batch, replace_with is the full-replacement path after cap consolidation, and the two are mutually exclusive. It also defines what constitutes a valid learning string (rule-of-thumb, no proper nouns/dates/per-entity data), which is crucial for correct invocation and not conveyed by the schema.

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 a specific verb and resource: append agent-specific operational RULES to the agent's persistent learning list for the next run, or replace the entire list for consolidation. It sharply differentiates from sibling tools like track_prospects, update_workspace, and save_memory by explicit scoping: per-entity facts, per-run summaries, and general user preferences are excluded. The inclusion of concrete good and bad examples removes ambiguity about what the tool is for.

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 states when to append vs. replace, when to use track_prospects/update_workspace/save_memory instead, and how to handle a cap-reached ModelRetry. It also gives precise batching guidance: pass learnings=[...] for one or more entries, and use replace_with after consolidation. No inference is required to decide when this tool is appropriate.

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