Skip to main content
Glama
sdiehl
by sdiehl

pdsolve_pde

Solve partial differential equations (PDEs) using SymPy's pdsolve function on the Symbolic Algebra MCP Server. Input expression key and function name to obtain a LaTeX-formatted solution, handling complex PDEs efficiently.

Instructions

Solves a partial differential equation using SymPy's pdsolve function.

Args:
    expr_key: The key of the expression (previously introduced) containing the PDE.
             If the expression is not an equation (Eq), it will be interpreted as
             PDE = 0.
    func_name: The name of the function (previously introduced) to solve for.
               This should be a function of multiple variables.

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

    # Create a PDE: 1 + 2*(ux/u) + 3*(uy/u) = 0
    expr_key = introduce_expression(
        "Eq(1 + 2*Derivative(f(x, y), x)/f(x, y) + 3*Derivative(f(x, y), y)/f(x, y), 0)"
    )

    # Solve the PDE
    result = pdsolve_pde(expr_key, "f")
    # Returns solution with exponential terms and arbitrary function

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expr_keyYes
func_nameYes
hintNo
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: it interprets non-equation expressions as PDE=0, returns a LaTeX string or error message, and requires previously introduced expressions/functions. However, it lacks details on performance, limitations, or side effects (e.g., state changes).

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 sections (description, args, example, returns), but includes verbose example code that could be condensed. Most sentences earn their place by clarifying usage, though some details (like the full example) are lengthy.

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 (PDE solving with 3 parameters, no annotations, no output schema), the description is mostly complete. It covers purpose, parameters, example usage, and return format. However, it omits the optional hint parameter and lacks error handling details, leaving minor gaps.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains expr_key as 'the key of the expression (previously introduced) containing the PDE' with interpretation rules, and func_name as 'the name of the function (previously introduced) to solve for.' The optional hint parameter is not mentioned, leaving a minor gap.

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 tool's purpose: 'Solves a partial differential equation using SymPy's pdsolve function.' It specifies the verb ('solves'), resource ('partial differential equation'), and implementation method ('SymPy's pdsolve function'), distinguishing it from sibling tools like dsolve_ode (for ODEs) or solve_algebraically (for algebraic equations).

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 description provides clear context on when to use this tool through the example, showing it requires pre-introduced variables and functions via sibling tools (intro, introduce_function, introduce_expression). However, it does not explicitly state when not to use it or name alternatives (e.g., dsolve_ode for ODEs), though the context implies differentiation from other solving tools.

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