Skip to main content
Glama

sympy_series

Compute series expansion of a mathematical expression symbolically, specifying variable, expansion point, and order.

Instructions

Compute series expansion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesString expression
variableNoVariable to expand aroundx
pointNoPoint to expand around0
orderNoOrder of expansion

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for sympy_series tool. It converts string inputs to SymPy objects and calls sympy.series() to compute the series expansion.
    @mcp.tool()
    def sympy_series(
        expr: str, variable: str = "x", point: str = "0", order: int = 6
    ) -> str:
        """Compute series expansion.
    
        Args:
            expr: String expression
            variable: Variable to expand around
            point: Point to expand around
            order: Order of expansion
    
        Returns:
            Series expansion as string
        """
        var = sympy.Symbol(variable)
        pt = _sympify(point)
        result = series(_sympify(expr), var, pt, order)
        return str(result)
  • The @mcp.tool() decorator registers sympy_series as an MCP tool on the FastMCP server instance.
    @mcp.tool()
    def sympy_series(
        expr: str, variable: str = "x", point: str = "0", order: int = 6
    ) -> str:
  • The function signature defines the input schema: expr (str), variable (str, default 'x'), point (str, default '0'), order (int, default 6). The return type is str.
    def sympy_series(
        expr: str, variable: str = "x", point: str = "0", order: int = 6
    ) -> str:
  • Helper function _sympify converts string expressions to SymPy objects, used by sympy_series to parse the input expression and point.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
Behavior2/5

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

No annotations provided. Description does not disclose any behavioral traits such as side effects, return type, or constraints. Agent gains no insight beyond what's implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Overly short; a single sentence that lacks sufficient detail. While concise, it sacrifices completeness for brevity, which is not effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description does not explain what 'series expansion' returns or any nuances. Incomplete for an agent to understand the tool's full capability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so description does not need to add much parameter info. However, it adds no extra context beyond the schema descriptions, justifying the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description 'Compute series expansion' is clear but vague. It states an action and object, but does not distinguish from sibling tools like sympy_limit or sympy_expand. Not a tautology, but minimal.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. Missing context on when series expansion is appropriate or when to choose another tool.

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

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

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