Skip to main content
Glama

sympy_acos

Compute the arc cosine (inverse cosine) of a numerical expression between -1 and 1 using symbolic mathematics.

Instructions

Arc cosine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesExpression (between -1 and 1)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the sympy_acos MCP tool. It takes a string expression, convert it to a SymPy object via _sympify, computes the arc cosine via sympy.acos, and returns the result as a string.
    @mcp.tool()
    def sympy_acos(expr: str) -> str:
        """Arc cosine.
    
        Args:
            expr: Expression (between -1 and 1)
    
        Returns:
            acos(expr) as string
    
        Example:
            >>> sympy_acos("1")
            "0"
        """
        return str(acos(_sympify(expr)))
  • Input schema: takes a single string parameter 'expr'. Output: returns a string.
    def sympy_acos(expr: str) -> str:
        """Arc cosine.
    
        Args:
            expr: Expression (between -1 and 1)
    
        Returns:
            acos(expr) as string
  • The tool is registered with the FastMCP server via the @mcp.tool() decorator on line 1209.
    @mcp.tool()
  • Helper function _sympify that converts a string expression to a SymPy object, used by sympy_acos to parse the input expression.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
  • The acos function is imported from sympy at line 49, which is the underlying symbolic arc cosine function used in sympy_acos.
    acos,
    asin,
    atan,
Behavior2/5

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

With no annotations, the description carries the full burden. It merely states the function name without disclosing key behaviors like return value range, handling of out-of-domain inputs, or precision characteristics. The schema partially compensates by specifying the domain, but the description adds no extra behavioral insight.

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 at two words, with no redundant information. However, it sacrifices utility for brevity; a slightly longer description could improve guidance without becoming verbose.

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?

For a simple mathematical function like arccosine, the description and schema together provide adequate information to invoke the tool correctly. The existence of an output schema helps, but the description could still benefit from mentioning the return value range (e.g., [0, π]) to fully inform the agent.

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 single parameter 'expr' is already well-described in the schema as 'Expression (between -1 and 1)', with 100% coverage. The description adds no additional meaning, so the baseline score of 3 is appropriate.

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 'Arc cosine' clearly states the mathematical function performed, using a specific verb and resource. However, it does not distinguish itself from sibling inverse trig functions like sympy_asin or sympy_atan, which could confuse an agent.

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 vs alternatives. The description lacks context such as typical input ranges or relationship to other trig functions, leaving the agent without decision support.

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