Skip to main content
Glama

compare_weights

Read-only

Compare selected tensors between two models to compute changed element counts and delta norms, revealing exactly which weights differ after fine-tuning or merging.

Instructions

Compute changed element counts and delta norms for selected, equally shaped tensors.

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": {
      "model_a": "<model_a>",
      "model_b": "<model_b>",
      "tensors": "<tensors>"
    },
    "name": "compare_weights"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_aYes
model_bYes
tensorsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds one real behavioral constraint — tensors must be equally shaped — but says nothing about what happens on shape mismatch, whether models must share architecture, or any cost/size limits for up to 64 tensors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. It is efficiently worded, though brevity here shades into under-specification rather than true density.

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 values need not be explained. However, for a three-required-parameter comparison tool with zero schema description coverage, the description leaves the identifier semantics and failure modes unaddressed.

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

Parameters2/5

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

Schema description coverage is 0% for all three parameters, so the description must compensate and largely fails. It implies model_a/model_b are the two sides of the comparison and that 'tensors' selects which tensors to compare, but never clarifies whether models are referenced by name, ID, or path, nor what form tensor identifiers take.

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 ('compute') and concrete outputs ('changed element counts and delta norms') over a named resource ('tensors'). This is clearly a comparison operation and distinguishable from mutation siblings like apply_weight_edits or preview_weight_edits, though it never names an alternative explicitly.

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?

The phrase 'selected, equally shaped tensors' implies a precondition but gives no guidance on when to use this versus preview_weight_edits, read_tensor, or inspect_model. No when-not conditions, no mention that both models must be identified first.

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