Skip to main content
Glama

matrix_rank

Computes the rank of a numeric matrix via Gaussian elimination with partial pivoting for 2D arrays up to 100x100.

Instructions

Compute the rank of a matrix using Gaussian elimination with partial pivoting.

Input Schema

NameRequiredDescriptionDefault
matrixYes2D number array (max 100x100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. Mentioning Gaussian elimination with partial pivoting hints at numerical method and stability, but nothing is said about the return value (an integer rank), handling of singular/non-numeric input, or size limits beyond the schema.

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 front-loaded sentence with the operation, target, and method, and zero filler. Nothing could be removed without losing information.

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

Completeness3/5

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

For a simple one-parameter computation this is minimally adequate: the input is fully documented in the schema and no output schema exists, but the description never states the expected result (a scalar rank), which is a small but real gap for an agent interpreting the return value.

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?

Only one parameter, and schema coverage is 100% — the schema already documents 'matrix' as a 2D number array with a max 100x100 bound. The description adds no meaning beyond this, so the baseline 3 applies.

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 (compute) and resource (rank of a matrix), and even names the algorithm used, so the operation is unambiguous. It does not, however, distinguish itself explicitly from close siblings like matrix_decomp, matrix_inverse, or gaussian_elimination, which share the same numeric domain.

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?

No when-to-use guidance, no prerequisites, and no routing to alternatives such as matrix_operate or matrix_decomp. The agent must infer the use case purely from the name and one-line description.

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

Deploy Server

Other Tools