Skip to main content
Glama
Symbolic Algebra MCP Server

Symbolic Algebra MCP Server

dsolve_ode

Solves ordinary differential equations symbolically using SymPy, returning a LaTeX solution; specify the equation expression and function, with an optional method hint.

Instructions

Solves an ordinary differential equation using SymPy's dsolve function.

Args:
    expr_key: The key of the expression (previously introduced) containing the differential equation.
    func_name: The name of the function (previously introduced) to solve for.
    hint: Optional solving method from ODEHint enum. If None, SymPy will try to determine the best method.

Example:
    # First introduce a variable and a function
    intro("x", [Assumption.REAL], [])
    introduce_function("f")

    # Create a second-order ODE: f''(x) + 9*f(x) = 0
    expr_key = introduce_expression("Derivative(f(x), x, x) + 9*f(x)")

    # Solve the ODE
    result = dsolve_ode(expr_key, "f")
    # Returns solution with sin(3*x) and cos(3*x) terms

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

Input Schema

NameRequiredDescriptionDefault
hintNo
expr_keyYes
func_nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it declares the return type ('LaTeX string'), the failure mode ('error message string if issues occur'), and the fallback behavior when hint is None (SymPy selects the best method). What's missing is detail on what kinds of failures produce errors or whether solution constants are included.

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?

Well-structured with Args/Example/Returns sections and the purpose front-loaded in the first line. The multi-step example is long but earns its place by showing the required setup calls; a slightly terser version would still convey the same.

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 computation tool with 2 required params and established state prerequisites, the definition covers purpose, setup sequence, hint semantics, and return format with an example. An output schema exists, so return-value detail is not strictly needed, and nothing essential for a correct call appears to be missing.

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: expr_key is tied to a previously introduced expression, func_name to a previously introduced function, and hint is explained including the None default behavior. The 44-value ODEHint enum itself remains unexplained, leaving the agent to choose a method blindly.

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 an ordinary differential equation') and names the underlying implementation, which is unambiguous. It doesn't explicitly contrast with the PDE sibling (pdsolve_pde), so differentiation is left to the agent's inference from 'ordinary' vs 'partial'.

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

Usage Guidelines4/5

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

The prerequisite workflow is spelled out clearly: an expression must already be introduced via introduce_expression and the function via introduce_function before calling. The worked example makes the intended call sequence concrete. It stops short of naming alternatives or stating when not to use it (e.g., for PDEs use pdsolve_pde).

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