Skip to main content
Glama

weight_update

Computes perceptron or logistic single-example updates from labeled example rows to adjust weights for classification training.

Instructions

Perceptron (threshold) or logistic single-example weight updates, one row per example. examples: [[x1, ..., y]].

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": {
      "examples": "<examples>",
      "weights": "<weights>"
    },
    "name": "weight_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
alphaNo
epochsNo
weightsYes
examplesYes
activationNothreshold

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden and does not meet it. It never says whether incoming weights are mutated or returned updated, how epochs and alpha interact, or what happens when the two classes are misclassified under each activation rule.

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?

Two short sentences, front-loaded with the algorithm and operation, and the trailing clause on row layout earns its space. Nothing is padded, though the brevity is partly the source of the documentation gaps.

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?

The presence of an output schema removes the need to describe return values, and the mention of threshold vs logistic hints at valid activation strings. However, for a five-parameter numeric ML tool with no annotations and no schema descriptions, key training parameters and update semantics are left undocumented.

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% across five parameters, so the description must compensate and largely fails. It only documents the examples shape ([[x1, ..., y]]) and implicitly ties 'threshold'/'logistic' to activation; alpha, epochs, and weights remain unexplained in both places.

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?

The description names a specific operation (single-example weight updates) and the two algorithm variants (perceptron/threshold and logistic), which separates it from siblings like neuron_output or gradient_descent_steps. It stops short of explicitly naming a sibling alternative, but the verb+resource is concrete enough to select on.

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?

There is no statement of when to use this versus neuron_output, logistic_regression_calc, or gradient_descent_steps, nor any prerequisite or exclusion guidance. The only usage-ish hint is 'one row per example,' which clarifies input packing rather than tool selection.

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