Skip to main content
Glama

tune_weights

Tune per-repo semantic weights by analyzing ranking events from telemetry, with dry-run and min-events options to prevent 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoOptional — single repo to tune. Omit to scan all repos with events.
min_eventsNo
dry_runNo
Behavior3/5

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

No annotations provided, so the description must cover behavioral traits. It discloses the file read, environment requirement, and effect of parameters (dry_run skips write, min_events prevents overfitting). However, it does not specify whether the operation is destructive, reversible, or if it requires locks or affects other repos.

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?

Three concise sentences front-load the core purpose, then explain parameter effects. No extraneous information.

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

Completeness3/5

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

Covers input source, env requirement, and parameter effects, but does not describe output format, side effects, or what happens to the index after tuning. For a tool with no output schema and no annotations, more detail on outcomes would improve completeness.

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 only describes 'repo' (33% coverage). The description adds meaning for 'min_events' (gates overfitting) and 'dry_run' (skips disk write), which are not described in schema. This compensates for the low schema coverage.

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 action: tuning weights (specifically semantic_weight) based on ranking events. It mentions the data source and environment variable, making it distinct from sibling tools which focus on analysis or retrieval, not tuning.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites beyond the environment variable, nor does it indicate when not to use it. Sibling tools are listed but not referenced.

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