Skip to main content
Glama

logistic_regression_calc

Computes logistic regression probabilities from feature inputs and weights; optionally performs one update step using target y and learning rate alpha.

Instructions

Logistic regression probability, and (with y and alpha) one update step under both common rules.

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": {
      "x": "<x>",
      "weights": "<weights>"
    },
    "name": "logistic_regression_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yNo
alphaNo
weightsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does disclose the two-mode behavior and that y and alpha gate the update step. It says nothing about what happens if only one of y/alpha is supplied, whether the update step is deterministic, or what the returned values represent beyond the bare mode split.

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?

One front-loaded sentence with the primary output first and the conditional mode in a parenthetical, with no filler. The terseness tips into cryptic at 'both common rules', which costs a point but not more.

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

Completeness2/5

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

For a four-parameter tool with zero schema description coverage, the description resolves only the mode switch; alpha's meaning, weights layout, and the identity of the 'two rules' remain undefined. The existing output schema covers return values, but the input-side gaps are too large for this complexity.

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%, so the description must define x, weights, y, and alpha itself. It only implies that y is a label and alpha a step-size-like scalar (never stated) and leaves 'weights' and the relationship between x and weights unexplained, while 'both common rules' names no actual rule (cross-entropy vs. squared error).

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 computation (logistic regression probability) and a second mode (one update step) triggered by y and alpha, so an agent can tell what the tool produces. It does not differentiate itself from nearby siblings such as neuron_output or weight_update, which likely overlap in the sigmoid/gradient territory.

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 parenthetical '(with y and alpha) one update step' gives a usable condition for selecting the second mode versus the plain probability mode. There is no guidance on when to prefer this tool over sibling calculators, and no mention of partial-input cases or failure modes.

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