Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

matrix_multiplication

Multiply two matrices by supplying rows as lists of lists; returns the resulting product matrix or an error message.

Instructions

Multiplies two matrices.

Args: matrix_a: The first matrix as a list of lists. matrix_b: The second matrix as a list of lists.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> matrix_multiplication([[1, 2], [3, 4]], [[5, 6], [7, 8]]) {'result': [[19, 22], [43, 50]]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrix_aYes
matrix_bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does a decent job: it discloses the success envelope {"result": ...}, the error envelope {"error": ...}, and a worked example. It omits the key constraint that matrix dimensions must be conformable, which is the main failure mode, keeping it out of 5 territory.

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?

Front-loaded one-line purpose followed by compact Args/Returns/Examples sections, each of which earns its place by supplying information absent from the schema. No filler or restatement of the tool name.

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 and no annotations, the description supplies the return and error formats plus an example, which is most of what an agent needs. The remaining gap is the absence of any statement about dimensional-compatibility requirements or return type guarantees.

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 description coverage is 0%, so the description must compensate, and it does: both matrix_a and matrix_b are described as lists of lists, which matches the nested-array schema and clarifies the expected nesting. It adds no constraints on shape or element type beyond that, so it is solid but not exhaustive.

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 precise verb and resource: 'Multiplies two matrices.' An agent can immediately distinguish this from matrix_addition, matrix_transpose, and matrix_determinant by the operation itself. However, it never explicitly contrasts itself with siblings like vector_dot_product, which is the closest conceptual neighbor, so it stops short of a 5.

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-to-use, or alternative-naming guidance. For a mathematical primitive the intended usage is strongly implied by the operation and the sibling set, which fits the 'implied usage' bar of 3, but nothing steers the agent between this and e.g. vector_dot_product.

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