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)
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.
replace_withNoFull replacement list for consolidation (mutually exclusive with learnings)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  2. 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"
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false. The description adds substantial behavior beyond that: list is capped at 25; an over-cap batch is rejected ATOMICALLY via ModelRetry; batches are preferred over singletons for latency/token cost; the list is per-agent and persistent. This is rich context the annotations cannot convey.

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?

Purpose is front-loaded and the sectioning (filter criteria, USAGE, CAP BEHAVIOR) is logical. It is long, and the anti-example enumeration plus the closing 'if you cannot rewrite...' paragraph partially restate earlier points, but for a tool whose correctness hinges on hygiene rules the length is largely earned.

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?

No formal output schema, but a <returns> block documents the response shape (success, agent_id, new learnings count). Combined with full coverage of atomicity, cap behavior, scope, alternatives, and consolidation workflow, nothing an agent needs to call this correctly is missing.

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?

Schema coverage is 100%, so the schema documents all four parameters. The description still adds value beyond it: it explains the atomic-batch semantics of learnings, the consolidation purpose of replace_with, and their mutual exclusivity in operational terms. It does not, however, clarify on_behalf_of beyond what the schema says.

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 opens with a specific verb+resource and scope: 'Append one or more agent-specific operational RULES that would make the NEXT run more reliable,' plus the replace variant. It explicitly distinguishes itself from siblings (save_memory for preferences, track_prospects for per-entity lifecycle, update_workspace for deliverables) so an agent can route correctly without opening any schema.

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?

Unusually strong. It states exactly when to use (rule-of-thumb learnings), when NOT to use (per-entity facts, per-run summaries, user preferences), and names the alternative tool for each exclusion. The cap-consolidation workflow (use replace_with after a ModelRetry) is spelled out explicitly.

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