Skip to main content
Glama

tune_weights

Tunes per-repository semantic weights using recent ranking events, preventing stale data from influencing the tuning and reducing overfitting.

Instructions

Online weight tuning. Reads ranking_events from ~/.doc-index/telemetry.db (requires JDOCMUNCH_PERF_TELEMETRY=1) and proposes a per-repo semantic_weight step. dry_run=true skips the disk write. min_events gates against early overfitting. Learns from a recency window of the ledger (default 90 days) so stale events can't anchor the weights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoOptional — single repo to tune. Omit to scan all repos with events.
min_eventsNo
dry_runNo
max_age_daysNoOnly learn from ledger events newer than this many days. Keeps stale events from anchoring weights to an outdated query distribution. 0 = lifetime ledger.
Behavior5/5

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

With no annotations, the description fully discloses behavior: it reads from a specific database file, requires an environment variable, performs a write operation (with dry-run option), and explains the learning window and its rationale. This provides comprehensive behavioral context.

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 brief (three sentences) and front-loads the core purpose. Each sentence adds critical information without redundancy.

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 has 4 parameters but no output schema, the description covers the source, each parameter's effect, and the learning behavior (recency window). This is sufficient for an agent to invoke the tool correctly and understand its impact.

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 50%. The description adds meaning for parameters like min_events ('gates against early overfitting') and dry_run ('skips the disk write'), and reinforces max_age_days ('keeps stale events from anchoring weights'). It compensates for undocumented schema parameters.

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 clearly states the tool's purpose: 'Online weight tuning'. It specifies the verb ('tunes'), the resource ('semantic_weight per repo'), and the source data ('ranking_events'). The tool is distinct from siblings which are mostly read-only analysis or indexing tools.

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 provides guidance on when to use, mentioning the dry_run flag for testing, min_events to prevent overfitting, and the recency window to avoid stale data. However, it does not explicitly state alternatives or situations where this tool should not be used.

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/jgravelle/jdocmunch-mcp'

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