Skip to main content
Glama

fit_temperature

Calibrate classifier confidence by fitting temperature scaling to logits, returning the optimal temperature and before/after metrics; optionally save recalibrated predictions.

Instructions

Fit temperature scaling on a predictions file that contains logits. Returns the optimal temperature and before/after metrics. Optionally saves the recalibrated predictions to save_to (.npz).

Note: for a fair estimate, fit on a validation split and evaluate on a test split.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "fit_temperature"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
n_binsNo
save_toNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key behavior: it returns the optimal temperature plus before/after metrics, and it can write a .npz artifact when save_to is set. It also states the prerequisite that the input file must contain logits. It does not cover error behavior for inputs lacking logits or whether an existing save_to file is overwritten.

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 short sentences, front-loaded with the core action and outputs, followed by a practical caveat. No redundant restatement of the name or filler text.

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?

An output schema exists, so return-value detail is not strictly required, and the main behavioral facts are present. The unexplained n_bins parameter and absent guidance on prerequisites or failure modes leave it adequate but not complete for a tool with no annotations.

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?

Schema description coverage is 0%, so the description must compensate. It clarifies that 'path' is a predictions file containing logits and that 'save_to' produces an .npz file, which adds real meaning. The third parameter, n_bins, is never mentioned in either schema or description, leaving a meaningful gap.

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 a specific verb and resource ('fit temperature scaling on a predictions file that contains logits') and enumerates the outputs it produces. It is clearly distinguishable from siblings like reliability_diagram or compare_models by the mention of the optimal temperature and before/after metrics, though it does not name a sibling to route away from.

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?

The note about fitting on a validation split and evaluating on a test split gives useful methodological context, implying this is a calibration-fitting step rather than an evaluation step. However, it offers no explicit guidance on when to use this versus evaluate_calibration or compare_models, so routing must be inferred.

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