Skip to main content
Glama
AbderY
by AbderY

matrix_multiply

Multiply two matrices by computing the matrix product A @ B for compatible rows and columns. Use it to get deterministic results for linear algebra tasks in a sandboxed math server.

Instructions

Return the matrix product A @ B.

Columns of A must match rows of B. Matrices are lists of rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses the input shape convention ('Matrices are lists of rows') and the dimension-compatibility contract, which is useful, but says nothing about error behavior when dimensions mismatch or about output formatting. For a pure computation tool this is adequate but thin.

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 short sentences, front-loaded with the operation and followed by the key constraint. No padding or redundancy.

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?

An output schema exists and the tool is a pure function, so return values and side effects need little explanation. The main omission is what happens on mismatched dimensions, but for this simple operation the definition is essentially complete.

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

Parameters3/5

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

Schema description coverage is 0%, with both parameters named only 'A' and 'B'. The description partially compensates by tying the A@B notation to the two inputs and clarifying that matrices are nested lists of rows, but it does not add per-parameter detail beyond the trivially simple 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 a specific verb and resource ('Return the matrix product A @ B'), which is unambiguous and clearly distinct from the sibling math operations. It does not explicitly name any sibling alternative, but the operation is self-identifying.

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?

There is no explicit when-to-use/when-not guidance or routing to alternatives like matrix_inverse or solve_linear_system. However, the stated precondition ('Columns of A must match rows of B') functions as an implied validity condition for invoking it correctly.

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