Skip to main content
Glama

matrix

Read-only

Compute exact linear algebra on fractions: determinant, inverse, transpose, RREF, multiplication, addition, subtraction, powers, and solve a·x=b.

Instructions

Exact matrix math on fractions: info, det, inverse, transpose, rref, multiply, add, subtract, power, solve (a·x=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": {
      "a": "<a>"
    },
    "name": "matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes[[1,2],[3,4]] or "1 2; 3 4"
bNo
kNopower
opNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds one genuinely useful behavioral fact beyond them — math is performed exactly on fractions rather than via floating point — but says nothing about error cases (singular matrix, dimension mismatch) or what results look like.

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?

A single front-loaded sentence with no filler; the colon-then-operation-list structure is easy to scan. It is close to optimal length, though the operation list largely duplicates the op enum already in the schema.

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 four-parameter math tool with no output schema, an agent still cannot tell what each op returns (scalar vs matrix vs info text) or how results are formatted. The exactness note helps, but return-shape information is absent and no output schema covers the gap.

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 50%: 'a' has a format example and 'k'/'op' are self-explanatory, but 'b' is undocumented in the schema. The description partially compensates by framing b via the equation 'a·x=b' for solve, but adds no format or dimension constraints for b.

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?

Names a specific resource (matrices) and enumerates the exact operations supported, with 'Exact ... on fractions' establishing the compute model. It does not name any sibling tool or explicitly separate itself from the generic 'solve'/'calc' siblings, 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance and no mention of alternatives such as the sibling 'solve' or 'calc'. The operation list implies which op value to pick, but the agent gets no routing help for choosing this tool over another.

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