Skip to main content
Glama

Matrix Inverse

matrix_inverse
Read-onlyIdempotent

Calculate the inverse of a square matrix.

Note: Requires NumPy. Raises ValueError if NumPy is unavailable.

Examples: matrix_inverse([[1, 2], [3, 4]]) matrix_inverse([[2, 0], [0, 2]]) # Diagonal matrix

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYes2D list of numbers representing a square matrix. Each inner list is a row. Example: [[1, 2], [3, 4]]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes
errorNo
topicYes
successYes
difficultyYes
result_matrixNo

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate read-only and idempotent behavior. The description adds the requirement for NumPy and the ValueError if unavailable, which is useful behavioral context. It does not mention behavior for singular matrices, but given the annotation coverage and output schema, this is a minor omission.

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?

The description is short, front-loaded with the purpose, and includes a concise note about NumPy and two illustrative examples. Every sentence earns its place with no redundancy or filler.

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 single-parameter mathematical tool with full schema coverage, clear annotations, and an output schema, the description is sufficiently complete. It states the purpose, prerequisites, and provides examples. A minor gap is the lack of explicit error behavior for singular matrices, but this does not detract significantly from overall completeness.

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 coverage is 100%, so the matrix parameter is fully described in the schema. The examples in the description reinforce the expected format but do not add semantic detail beyond the schema's existing description.

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 uses a specific verb 'Calculate' and resource 'inverse of a square matrix', making the tool's purpose unmistakable. It clearly distinguishes from sibling matrix tools like determinant or transpose by naming the specific operation and the square-matrix constraint.

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 does not explicitly state when to use this tool versus alternatives. The purpose is clear enough for selection, but no direct comparison or exclusion is provided. The NumPy dependency note is a prerequisite rather than usage guidance.

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.

TDQS

A4/5.0
Disambiguation4/5

Most tools are clearly distinct (calculation, interest, stats, units, matrix ops, plotting, workspace). However, plot_function, plot_line_chart, and plot_financial_line could be confused since they all produce line-like plots, though descriptions note their specific use cases.

Naming Consistency5/5

Tool names follow a clear, consistent prefix pattern: calc_*, matrix_*, plot_*, and workspace_*. This makes it easy to infer related functionality at a glance.

Tool Count4/5

17 tools is on the higher side but acceptable for the wide math scope (basic arithmetic, statistics, units, matrices, plotting, workspace). Each tool serves a distinct purpose, though a couple like plot_line_chart and plot_function could potentially be consolidated.

Completeness4/5

Core mathematical operations are well covered: expression evaluation, statistics, unit conversion, matrix operations, and common plot types. Minor gaps exist (e.g., no bar chart, no equation solving), but these are not critical for the server's apparent educational purpose.