Skip to main content
Glama

tune_decision_weights

Read-onlyIdempotent

Re-fit decision confidence weights from accumulated approve/reject review events to improve future confidence predictions. Requires a minimum number of events with both labels.

Instructions

Re-fit decision confidence weights from accumulated review feedback (approve/reject events). Requires >= min_events reviews and at least one of each label. Mutating: when dry_run=false and the fit succeeds, persists to ~/.trace-mcp/confidence_weights.json and resets the in-memory weight cache so subsequent remember_decision calls use the new weights. Returns: { ok, reason, events_used, weights?, before?, loss_before?, loss_after?, applied }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_rootNoFilter review events to a specific project (default: current project root).
min_eventsNoMinimum review events before tuning will fit (default: 25, configurable via memory.weight_tuning.min_events).
dry_runNoWhen true (default), compute weights without persisting to disk. Set false to apply the fit.
Behavior1/5

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

The description contradicts the annotations: it states that when dry_run=false and the fit succeeds, it persists to disk and resets a cache (clearly a mutating operation), while annotations set readOnlyHint=true. This misalignment could severely mislead an agent relying on annotations.

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 concise (4 sentences) and front-loaded with the main purpose. Every sentence adds value: prerequisites, mutation side effects, and return structure. No wasted words.

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?

All aspects are covered: purpose, prerequisites, side effects, dry_run behavior, and return fields. The return structure is explicitly documented despite no output schema. The description is sufficient for an agent to use the tool correctly.

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

Parameters3/5

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

Input schema covers 100% of parameters with descriptions. The tool description adds no new semantic information beyond what the schema already provides (e.g., defaults, constraints). Baseline score of 3 is appropriate.

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 it re-fits decision confidence weights from review feedback, specifying the verb ('Re-fit'), resource ('decision confidence weights'), and scope ('from accumulated review feedback'). This distinguishes it from siblings like 'tune_weights' which likely apply to a different domain.

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 explicitly states prerequisites (min_events, at least one of each label) and explains the dry_run parameter behavior. However, it does not compare to siblings like 'tune_weights' or specify when to avoid using this tool, leaving some ambiguity for the agent.

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/nikolai-vysotskyi/trace-mcp'

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