Skip to main content
Glama
Symbolic Algebra MCP Server

Symbolic Algebra MCP Server

solve_linear_system

Solves a system of linear equations from previously introduced expressions for specified variables and returns the solution set as a LaTeX string, with optional domain selection.

Instructions

Solves a system of linear equations using SymPy's linsolve.

Args:
    expr_keys: The keys of the expressions (previously introduced) forming the system.
    var_names: The names of the variables to solve for.
    domain: The domain to solve in (Domain.COMPLEX, Domain.REAL, etc.). Defaults to Domain.COMPLEX.

Returns:
    A LaTeX string representing the solution set. Returns an error message string if issues occur.

Input Schema

NameRequiredDescriptionDefault
domainNocomplex
expr_keysYes
var_namesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the return format (LaTeX solution set) and error behavior (error message string on failure). However, it does not describe what happens for inconsistent or underdetermined systems, nor does it state prerequisites or permissions, leaving meaningful behavioral gaps.

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?

Front-loaded with the action in the first sentence, followed by a conventional Args/Returns block. Every line is informative; minor redundancy in restating the default that also appears in the schema.

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?

For a three-parameter solver with an output schema available, the description covers purpose, parameters, and return type adequately. Remaining gaps concern edge-case behavior for singular systems, which is minor given the output schema and error-message disclosure.

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 description coverage is 0%, so the description must compensate, and it does: each of the three parameters is explained, including that domain defaults to Domain.COMPLEX. It still does not clarify format expectations for expr_keys/var_names (e.g. whether keys are opaque handles vs. strings of expressions), which the bare schema leaves ambiguous.

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 and resource ('Solves a system of linear equations') and names the underlying mechanism (SymPy's linsolve), which implicitly distinguishes it from solve_nonlinear_system and solve_inequality. It does not explicitly name the siblings it supersedes, so differentiation is inferential rather than stated.

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?

The word 'linear' implies when this tool applies versus nonlinear solvers, and 'previously introduced' hints at a prerequisite, but there is no explicit when-to-use/when-not guidance or named alternative such as solve_algebraically. Usage is implied rather than directed.

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