Skip to main content
Glama

cos_retrieval_learn

Learn from recent retrieval outcomes to adjust document chunk priorities, boosting chunks cited in successful tasks and reducing those in rework or blocked tasks.

Instructions

Adjust document_chunks.priority based on recent retrieval outcomes.

Walks retrievals with a known outcome in the lookback window and:

  • chunk cited in a success task → priority += 0.02

  • chunk cited in a rework/blocked task → priority −= 0.01

  • passive retrievals ±0.005 (weaker signal)

Clamped to [0.1, 0.9]. Intended to run nightly via cron or after a batch of task-done events.

Args: lookback_days: How many days of retrievals to consider (default 7). dry_run: When True, compute changes without writing.

Returns: {adjusted, gained, lost, changes[], status} envelope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
lookback_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description goes far beyond the annotations by detailing the exact priority adjustment rules, clamping bounds, and the dry_run behavior that avoids writes while still computing changes. It also explains the weaker signal for passive retrievals and the return envelope, providing comprehensive behavioral transparency.

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-organized with a summary line, bullet points for update rules, a clamping note, a usage intent sentence, and clearly labeled Args/Returns sections. It is detailed but every line adds necessary information without fluff.

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 moderate complexity of a learning/adjustment tool with an output schema, the description fully covers behavior, parameters, return shape, and intended execution context. It is self-sufficient for an agent to select and invoke correctly.

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?

Even though schema description coverage is 0%, the description includes an Args section that fully explains both parameters: lookback_days (what it controls, default) and dry_run (what it does, including the 'without writing' behavior). This compensates entirely for the schema's lack of description.

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: 'Adjust document_chunks.priority based on recent retrieval outcomes.' It clearly differentiates this tool from siblings like cos_retrieval_quality or cos_retrieval_cite by focusing on priority modification from outcome learning.

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

Usage Guidelines4/5

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

The description states it is 'Intended to run nightly via cron or after a batch of task-done events,' giving explicit context for when to use it. It does not explicitly name alternative tools or exclusions, but the scheduling context is clear and practical.

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/kouroshez/coding-os'

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