Skip to main content
Glama
apetta

Vibe Math MCP

by apetta

Linear System Solver

solve_linear_system
Read-onlyIdempotent

Solve systems of linear equations Ax=b using SciPy's optimized solver. Handles square systems directly and overdetermined systems via least squares for best-fit solutions.

Instructions

Solve systems of linear equations (Ax = b) using SciPy's optimised solver.

Examples:

SQUARE SYSTEM (2 equations, 2 unknowns): coefficients=[[2,3],[1,1]], constants=[8,3], method="direct" Solves: 2x+3y=8, x+y=3 Result: [x=1, y=2]

OVERDETERMINED SYSTEM (3 equations, 2 unknowns): coefficients=[[1,2],[3,4],[5,6]], constants=[5,6,7], method="least_squares" Finds best-fit x minimizing ||Ax-b|| Result: [x≈-6, y≈5.5]

3x3 SYSTEM: coefficients=[[2,1,-1],[1,3,2],[-1,2,1]], constants=[8,13,5], method="direct" Result: [x=3, y=2, z=1]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoOptional annotation to label this calculation (e.g., 'Bond A PV', 'Q2 revenue'). Appears in results for easy identification.
output_modeNoOutput format: full (default), compact, minimal, value, or final. See batch_execute tool for details.full
coefficientsYesCoefficient matrix A in Ax=b system (2D list, e.g., [[2,3],[1,1]])
constantsYesConstants vector b in Ax=b system (1D list, e.g., [8,3])
methodNoSolution method: direct=exact (square systems), least_squares=overdetermined systemsdirect

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, so the description does not need to restate them. It adds value by specifying the use of SciPy's solver and giving result examples, which imply no side effects. No contradictions.

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?

The description is front-loaded with the purpose, followed by well-structured examples. While somewhat long, the examples are instructive and not redundant. It could be slightly more concise, but the structure is logical and easy to follow.

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

Completeness5/5

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

Given the presence of an output schema (implied), the description covers essential use cases (square, overdetermined, larger systems) with example inputs and outputs. It provides sufficient context for both simple and complex scenarios, making it complete for this tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage, but the examples add significant meaning: they show how to structure coefficients and constants as nested lists, demonstrate valid inputs for different system sizes, and clarify the method parameter with concrete use cases. This greatly aids understanding beyond the schema.

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 clearly states it solves linear systems Ax=b using SciPy's optimized solver, which is a specific verb+resource. The examples with different system types (square, overdetermined) further clarify its purpose and distinguish it from sibling tools like matrix_operations or calculate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description explicitly explains when to use 'direct' (square systems) vs 'least_squares' (overdetermined systems) via examples. It also shows the syntax for different system sizes, providing clear usage context without leaving ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/apetta/vibe-math-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server