Skip to main content
Glama

MatrixCalculator.net

matrix_subtract

Read-onlyIdempotent

Subtract matrix B from matrix A when both have the same dimensions. Useful for exact matrix subtraction, including negative values and step-by-step entry calculations. Accepts integers, decimals, and fraction strings; returns each exact difference and its calculation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixAYesMatrix to subtract from.
matrixBYesMatrix to subtract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, lowering the burden. The description adds genuinely new behavior beyond them: precise arithmetic semantics ("exact difference"), accepted input grammar (integers, decimals, fraction strings), and the shape of the return ("each exact difference and its calculation"). Error behavior on a dimension mismatch is still undisclosed.

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?

Two tight sentences with the operation and its precondition front-loaded, followed by accepted inputs and return format. No filler or restated name/title.

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

Completeness4/5

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

With no output schema, the description usefully covers what is returned and what inputs are accepted, and it states the dimension-match requirement. It stops short of describing failure behavior when dimensions differ, which is the only meaningful remaining gap for such a simple tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3. The description earns above baseline by clarifying the otherwise ambiguous union type 'string|number' — the string branch means fraction strings — and by tying both parameters to the same-dimension constraint.

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?

Specific verb+resource ("Subtract matrix B from matrix A") with an explicit precondition. The operation is clearly distinguishable from matrix_add, matrix_multiply, and matrix_transpose by the verb itself, though no sibling is named to reinforce the distinction.

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 description states a real usage precondition ("when both have the same dimensions"), which governs when this call is valid. However, it names no alternative tool and gives no guidance on what to do for non-conforming inputs, so usage is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.