Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

matrix_determinant

Computes the determinant of a square matrix from row data and returns the numeric result, aiding linear algebra and matrix calculations.

Instructions

Computes the determinant of a square matrix.

Args: matrix: A square matrix as a list of rows.

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

Examples: >>> matrix_determinant([[1, 2], [3, 4]]) {'result': -2.0}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does disclose key behavioral traits: it specifies the required square matrix input, the success return format, and the error return format. It also provides a concrete example output. However, it omits edge-case behavior such as what happens for non-square matrices or empty inputs beyond a generic error message.

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?

The description is well-structured with a clear purpose statement, argument description, return values, and an example. It is front-loaded and every section earns its place, though the example could be considered slightly redundant for such a straightforward function.

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

Completeness5/5

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

For a simple mathematical function with one parameter, no output schema, and no annotations, the description provides complete information: input shape, output format on success and error, and a concrete example. An agent has everything needed to invoke it correctly.

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. It does so by clarifying that the 'matrix' parameter is a square matrix given as a list of rows. This adds meaningful semantics beyond the schema, which only specifies a nested array of numbers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Computes the determinant of a square matrix.' This clearly distinguishes it from siblings like matrix_transpose or matrix_multiplication, which perform different operations on matrices.

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 does not explain when to use this tool versus alternatives. While the purpose implies its use for determinant calculations, there is no explicit guidance on context or exclusions relative to other matrix operations in the sibling list.

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