Skip to main content
Glama

learn_collect

Collect compact session records from local agents for /learn, or estimate a run's cost. Writes a run directory with sessions, usage, phrases, and mapper shards without changing skills.

Instructions

Collect compact session records from every local agent for /learn, or estimate the cost of a run. Default scope is all history. Writes a run directory of sessions, surfaces, usage, phrases, and plan.json mapper shards. Does not change skills.

Input Schema

NameRequiredDescriptionDefault
cwdNoKeep only sessions whose cwd starts with this
outNo
daysNo
agentNoagy, claude, codex, copilot, cursor, gemini, grok, or opencode
batchNoSessions per mapper (25, or 1 for per-trace)
limitNo
estimateNoWhen true, write estimate.json only
since_lastNo
drop_patternNo
include_headlessNo
include_subagentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.2
    • changedInput schema / properties / agent / description
      Previous value: -"claude, codex, copilot, cursor, gemini, grok, or opencode"New value: +"agy, claude, codex, copilot, cursor, gemini, grok, or opencode"
  2. Addedv0.12.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the concrete write side-effects (a run directory of sessions, surfaces, usage, phrases, plan.json shards) and a negative trait ('Does not change skills'), which is genuinely useful. However it omits permissions, overwrite/reversibility behavior of the run directory, and any rate or cost caveats, leaving real gaps.

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?

Three tight sentences, front-loaded with the primary action and default scope. Minor loss for packing the estimator alternative into the opening sentence, which slightly blurs the primary purpose.

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

Completeness2/5

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

For an 11-parameter tool with no annotations, no output schema, and only 36% schema description coverage, the description is under-specified. It lists output artifacts but leaves most parameters and any operational prerequisites unexplained, so an agent cannot call it precisely without guesswork.

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

Parameters2/5

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

Schema coverage is only 36% across 11 parameters. The description only tangentially gestures at two of them ('Default scope is all history' ~ days/since_last, 'estimate the cost of a run' ~ estimate) and says nothing about cwd, out, agent, batch, limit, drop_pattern, include_headless, or include_subagents. It fails to compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verbs (collect, estimate) and resources (compact session records, run directory) with named artifacts (sessions, surfaces, usage, phrases, plan.json mapper shards). It is clearly distinguishable from generic siblings, though it never names the closely related learn_state or session_digest to sharpen the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives implied context ('for /learn', 'Default scope is all history') and a mode switch (estimate the cost of a run), but never states when to prefer this over learn_state, session_digest, or read_transcript, and offers no exclusions beyond 'Does not change skills.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.