Skip to main content
Glama

linear_solve

Read-onlyIdempotent

Solves systems of linear equations Ax = b using Gaussian elimination with partial pivoting, returning the solution vector for square coefficient matrices and right-hand side vectors.

Instructions

Solve a system of linear equations Ax = b using Gaussian elimination with partial pivoting.

Input Schema

NameRequiredDescriptionDefault
matrixYesCoefficient matrix A (square, 2D array).
vectorYesRight-hand side vector b.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered and the description only needs to add computational traits. It does add the algorithm and pivoting strategy, which hints at numerical stability, but says nothing about behavior on singular or inconsistent systems, or about precision/rounding. Modest added value over the annotations.

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 no filler; the verb, resource, and method all appear immediately. Nothing is wasted.

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

Completeness2/5

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

There is no output schema, so the description carries the burden of explaining what comes back (solution vector, residual, or error on singular input) and it does not. For a solver whose failure modes matter to callers, this leaves a significant 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 100%, with both 'matrix' and 'vector' already described as A and b respectively. The description's 'Ax = b' phrasing reinforces the mapping but adds no format, shape, or validation detail beyond the schema. 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+resource ('Solve a system of linear equations Ax = b') and names the algorithm (Gaussian elimination with partial pivoting), so the operation is unambiguous. However, it does not distinguish itself from the sibling tool 'gaussian_elimination', which appears to cover very similar ground.

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 guidance on when to use this versus 'gaussian_elimination', 'matrix_inverse', or 'simplex_solve'. There is also no mention of prerequisites such as A needing to be square and non-singular, which the agent must infer from the schema alone.

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