Skip to main content
Glama

Matrix Multiplication

calculator_matrix_multiply
Read-only

Standard matrix product A × B (cols A must equal rows B).

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": {
      "matrix_a": "<matrix_a>",
      "matrix_b": "<matrix_b>"
    },
    "name": "calculator_matrix_multiply"
  }
}

Input Schema

NameRequiredDescriptionDefault
matrix_aYesFirst matrix.
matrix_bYesSecond matrix.

Output Schema

NameRequiredDescriptionDefault
resultYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this a safe, read-only, closed-world computation, so the safety profile is covered. The description adds the dimension-compatibility rule, which prevents most call failures, but says nothing about what happens on a mismatch (error vs. no result) and nothing about output shape given an output schema exists.

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?

A single tight sentence with the operation front-loaded and the constraint in parentheses. Zero waste, no restatement of the tool name or 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?

For a two-parameter, pure-computation tool with an output schema and read-only annotations, the description covers the essentials. The only meaningful gap is the expected input shape (2D nested arrays), which the schema's array-of-number typing leaves ambiguous.

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 100%, so baseline is 3. Writing "A × B" reinforces that operand order matters (multiplication is non-commutative), but the schema types matrix_a/matrix_b as flat arrays of numbers while the description gives no hint that nested 2D arrays are required — a real ambiguity the description could have resolved.

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 operation ("Standard matrix product A × B") and the validity constraint, which is enough to distinguish it from siblings like calculator_matrix_add, calculator_dot, or calculator_transpose. It never uses the word multiply and doesn't explicitly name those siblings, so differentiation is inferable rather than explicit.

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?

The description explains when the operation is mathematically valid (cols A = rows B) but gives no guidance on when to choose this tool over calculator_dot, calculator_matrix, or calculator_matrix_inverse. No prerequisites or alternatives are named.

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.