Skip to main content
Glama
sdiehl
by sdiehl

solve_linear_system

Solves systems of linear equations with specified variables and domains, returning results as LaTeX-formatted solution sets. Powered by SymPy’s symbolic algebra capabilities.

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

TableJSON Schema
NameRequiredDescriptionDefault
domainNocomplex
expr_keysYes
var_namesYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it specifies the solving method (SymPy's linsolve), mentions dependencies on 'previously introduced' expressions, describes the return format (LaTeX string or error message), and notes the default domain. However, it doesn't cover potential limitations like unsolvable systems or performance aspects.

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 well-structured with clear sections (Args, Returns) and front-loaded purpose. Every sentence earns its place, though it could be slightly more concise by integrating the default domain note into the domain parameter description rather than as a separate sentence.

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?

Given the complexity of solving linear systems, no annotations, and no output schema, the description is quite complete: it explains purpose, parameters, return values, and dependencies. The main gap is lack of explicit error conditions or limitations, but it covers the essential context for effective use.

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?

With 0% schema description coverage, the description fully compensates by explaining all three parameters: expr_keys are 'keys of the expressions (previously introduced) forming the system', var_names are 'names of the variables to solve for', and domain is 'the domain to solve in' with examples and default. This adds crucial meaning beyond the bare 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 the specific action ('Solves a system of linear equations') using a specific method ('using SymPy's linsolve'), which distinguishes it from sibling tools like solve_nonlinear_system. It provides the verb+resource combination needed for precise understanding.

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 description implies usage through the mention of 'previously introduced' expressions, suggesting a workflow with introduce_expression, but doesn't explicitly state when to use this tool versus alternatives like solve_algebraically or solve_nonlinear_system. No explicit exclusions or comparisons are provided.

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

Related 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/sdiehl/sympy-mcp'

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