Skip to main content
Glama

sympy_zeta

Compute the Riemann zeta function of a symbolic expression, providing exact algebraic results.

Instructions

Riemann zeta function.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sYesExpression

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the sympy_zeta tool. Converts input string to a SymPy expression and evaluates the Riemann zeta function, returning the result as a string.
    @mcp.tool()
    def sympy_zeta(s: str) -> str:
        """Riemann zeta function.
    
        Args:
            s: Expression
    
        Returns:
            zeta(s) as string
    
        Example:
            >>> sympy_zeta("2")
            "pi**2/6"
        """
        return str(zeta(_sympify(s)))
  • Registration of sympy_zeta as an MCP tool via the @mcp.tool() decorator on the FastMCP instance.
    @mcp.tool()
  • Helper function used by sympy_zeta to convert string input to a SymPy expression.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
  • The zeta function is imported from sympy and used in the handler.
    zeta,
  • Test case for sympy_zeta verifying that zeta(2) returns pi**2/6.
    def test_zeta(self):
        """Test zeta function."""
        result = tools.sympy_zeta("2")
        assert "pi**2/6" == result
Behavior2/5

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

No annotations are present, so the description bears full responsibility for behavioral disclosure. It merely states the function name without describing any traits such as domain, analytic continuation, poles, or error handling. This is insufficient for safe and accurate use.

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

Conciseness3/5

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

The description is extremely concise—only a single phrase. While it avoids verbosity, it could be slightly expanded to include more context without becoming overly long. The lack of structure (e.g., sentences) is acceptable but not ideal.

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?

The Riemann zeta function is a complex mathematical function requiring context about evaluation (e.g., domain, series, special values). The description provides none. While an output schema exists, it is not detailed here, so the description remains incomplete for effective use.

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?

The input schema has 100% description coverage for the single parameter 's', described as 'Expression'. The tool description adds no further semantic meaning, leaving the schema to carry the full weight. A baseline score of 3 is appropriate as the schema adequately defines the parameter.

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?

The description clearly identifies the tool as 'Riemann zeta function', which is a specific and well-known mathematical function. This verb+resource combination is clear but does not differentiate from closely related functions like the Dirichlet eta function (sympy_dirichlet_eta).

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 is provided on when to use this tool versus alternatives. The sibling list includes many special functions, but the description offers no context for selection or exclusion.

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