Skip to main content
Glama

sympy_cosh

Compute the hyperbolic cosine of symbolic expressions for mathematical analysis and calculus tasks.

Instructions

Hyperbolic cosine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesExpression

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the sympy_cosh tool. Uses the @mcp.tool() decorator for registration, converts the input string to a SymPy object via _sympify, computes the hyperbolic cosine using sympy.cosh, and returns the result as a string.
    @mcp.tool()
    def sympy_cosh(expr: str) -> str:
        """Hyperbolic cosine.
    
        Args:
            expr: Expression
    
        Returns:
            cosh(expr) as string
    
        Example:
            >>> sympy_cosh("0")
            "1"
        """
        return str(cosh(_sympify(expr)))
  • Type signature: accepts a string expression and returns a string result.
    def sympy_cosh(expr: str) -> str:
  • Registration of sympy_cosh as an MCP tool via the @mcp.tool() decorator on the FastMCP instance 'mcp'.
    @mcp.tool()
  • Helper function _sympify converts a string expression to a SymPy object, used by sympy_cosh.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
  • Import of sympy.cosh used in the sympy_cosh handler.
    cosh,
Behavior2/5

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

With no annotations provided, the description bears the full burden of behavioral disclosure. It only states 'Hyperbolic cosine' and offers no details about return values, error handling, or domain constraints. While an output schema exists, the description itself lacks transparency.

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 extremely concise and front-loaded. For a simple mathematical function, the single phrase is appropriate and not wasteful, though it could be slightly expanded without losing conciseness.

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

Completeness3/5

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

Given the tool's simplicity and the presence of an output schema, the description provides minimal but adequate context for a basic hyperbolic cosine operation. However, it does not clarify what constitutes a valid input expression, which could lead to ambiguity.

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% coverage with a single parameter 'expr' described as 'Expression.' The description adds no meaning beyond this, so it meets the baseline for high schema coverage without additional clarification.

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 accurately states 'Hyperbolic cosine,' which clearly identifies the mathematical function and distinguishes it from related siblings like sympy_cos (cosine) and sympy_sinh (hyperbolic sine). However, it lacks any additional context that might clarify its scope or usage within SymPy.

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?

The description provides no guidance on when to use this tool versus alternatives such as sympy_cos, sympy_sinh, or other hyperbolic functions. It simply states what the tool does without any contextual cues for selection.

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