sympy_classify_ode
Classify an ordinary differential equation (ODE) by specifying the equation and dependent variable.
Instructions
Classify ODE.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eq | Yes | ||
| func | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/mcp_sympy/tools.py:2285-2288 (handler)The handler function for the sympy_classify_ode tool. It takes an ODE equation string and a function string, converts them to SymPy objects via _sympify, then calls sympy.classify_ode and returns the result as a string.
@mcp.tool() def sympy_classify_ode(eq: str, func: str) -> str: """Classify ODE.""" return str(sympy.classify_ode(_sympify(eq), _sympify(func))) - src/mcp_sympy/tools.py:2285-2285 (registration)The @mcp.tool() decorator registers the sympy_classify_ode function as an MCP tool with the FastMCP server.
@mcp.tool() - src/mcp_sympy/tools.py:114-116 (helper)Helper utility that converts a string expression into a SymPy object using sympy.sympify. Used by sympy_classify_ode to parse input strings.
def _sympify(expr: str) -> sympy.Basic: """Convert string expression to SymPy object.""" return sympy.sympify(expr) - src/mcp_sympy/tools.py:119-119 (registration)The FastMCP server instance that provides the @mcp.tool() decorator for registration.
mcp = fastmcp.FastMCP("mcp-sympy")