Skip to main content
Glama

mlp_forward_backprop

Run a forward pass through a feed-forward network and optionally perform one backpropagation step with targets to compute outputs and weight updates.

Instructions

Forward pass through a feed-forward network and, with targets, one back-propagation step (AIMA Fig 18.24). layers[l][j] = weights [w0, w1, ...] of unit j in layer l.

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": {
      "inputs": "<inputs>",
      "layers": "<layers>"
    },
    "name": "mlp_forward_backprop"
  }
}

Input Schema

NameRequiredDescriptionDefault
alphaNo
inputsYes
layersYes
targetsNo
activationNologistic

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden. It does disclose two important traits: that back-propagation is a single step rather than full training, and the exact nesting convention for layers. It omits whether weights are mutated in place or returned, how alpha is applied, which activation functions are valid, and permission/side-effect characteristics.

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 tight sentences with the operation front-loaded and the structural convention second. Nothing is wasted, though the AIMA figure citation and compressed notation assume domain familiarity.

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 five-parameter numerical tool with no annotations and zero schema coverage, the definition leaves too much unexplained (activation choices, learning-rate role, mutation semantics) to be considered complete.

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 does not. It explains only the structure of `layers` (unit j of layer l holds [w0, w1, ...]); `inputs`, `targets`, `alpha`, and `activation` (including its default of 'logistic') get no meaning beyond their names and types.

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 specific verbs and resource: a forward pass through a feed-forward network plus, when targets are supplied, one back-propagation step. This clearly separates it from sibling tools like neuron_output, weight_update, or gradient_descent_steps, though it never names a sibling explicitly.

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 phrase 'and, with targets, one back-propagation step' implicitly tells the agent that omitting targets yields forward-only evaluation. That is useful conditional guidance, but there is no explicit when-to-use versus alternatives, no prerequisites, and no statement of when this is preferable to weight_update or gradient_descent_steps.

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