Skip to main content
Glama

Matrix Ops

matrix_ops
Read-onlyIdempotent

Linear algebra on matrices, exactly where it matters. Determinant, inverse, RREF, rank, null space, linear solve (Ax = b), multiply, add / subtract, integer powers, trace and LU are computed with exact rational arithmetic (entries may be integers, decimals or "p/q" strings — 0.1 stays 1/10), returned as exact values plus decimals. Floating-point eigenvalues (Jacobi for symmetric matrices with eigenvectors; Hessenberg + shifted QR for general matrices including complex eigenvalues, with eigenvectors for real eigenvalues), singular values (one-sided Jacobi SVD), QR, norms and condition number. op=analyze returns determinant, rank, trace, inverse, symmetry and eigenvalues in one call. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/matrix-ops

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_ops"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesMatrix A as an array of rows (max 40x40; 30x30 for exact ops). Entries: numbers or "p/q" strings
bNoMatrix B (multiply / add / subtract) or right-hand side vector / matrix (solve)
opNoanalyze
normNofro
powerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the numerics (exact rational arithmetic with 0.1 preserved as 1/10, returned as exact values plus decimals), the algorithms used for eigen/SVD, size limits, and — critically — that each successful call costs $0.002 USDC via x402 on Solana, with an equivalent HTTPS endpoint. Payment and precision semantics are exactly the kind of behaviour annotations cannot convey.

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?

Information-dense and reasonably front-loaded — operations and arithmetic model come first, pricing and endpoint last. The opening clause 'exactly where it matters' is marketing filler, and the operation list is compressed into run-on sentences that would read better structured.

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, the description still tells the agent what comes back for exact ops (exact values plus decimals) and which algorithms produce the floating-point results. It does not describe the per-op response shape or error behaviour on oversized/non-conforming input, which is the main residual gap for a 5-parameter tool.

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 coverage is only 40%, so the description has to carry weight, and it does: it maps each enum value of op to its computation and explains that entries may be integers, decimals or "p/q" strings. The norm and power parameters are touched only implicitly through the operation list, and b's shape is left largely to the schema.

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?

The description names a concrete verb+resource (linear algebra on matrices) and enumerates the supported operations (det, inverse, RREF, rank, nullspace, solve, multiply, add/subtract, power, trace, LU, eigen, svd, QR, norm, cond), so the scope is unmistakable. It stops short of distinguishing itself from near-neighbour siblings such as poly_mul, sl2_mul or quat_mul, which an agent could plausibly confuse with matrix multiply.

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?

Usage is only implied: the reader infers 'use this for matrix computations' and learns that op=analyze bundles determinant, rank, trace, inverse, symmetry and eigenvalues into one call. There is no explicit when-to-use / when-not-to-use guidance, nor a pointer to alternatives for polynomial or quaternion algebra.

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.

Resources