Skip to main content
Glama

sympy_satisfiable

Check if a Boolean expression is satisfiable by determining whether there exists an assignment of variables that makes it true.

Instructions

Check if expression is satisfiable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesBoolean expression

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function `sympy_satisfiable` that checks if a boolean expression is satisfiable using SymPy's `satisfiable()` function.
    @mcp.tool()
    def sympy_satisfiable(expr: str) -> str:
        """Check if expression is satisfiable.
    
        Args:
            expr: Boolean expression
    
        Returns:
            Solution or False
    
        Example:
            >>> sympy_satisfiable("x & y")
            "{x: True, y: True}"
        """
        return str(satisfiable(_sympify(expr)))
  • The function signature defines the schema: takes a single string `expr` (the boolean expression) and returns a string (the solution or 'False').
    @mcp.tool()
    def sympy_satisfiable(expr: str) -> str:
        """Check if expression is satisfiable.
    
        Args:
            expr: Boolean expression
    
        Returns:
            Solution or False
    
        Example:
            >>> sympy_satisfiable("x & y")
            "{x: True, y: True}"
        """
        return str(satisfiable(_sympify(expr)))
  • The `@mcp.tool()` decorator registers this function as an MCP tool named 'sympy_satisfiable'.
    @mcp.tool()
  • The `_sympify` helper function converts a string expression to a SymPy object, used by the handler.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
  • Import of `satisfiable` from SymPy, which is the underlying function called by the handler.
    satisfiable,
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. However, it does not mention whether the tool returns a boolean, uses SAT solvers, or handles symbolic expressions. The description is too minimal to convey key behavioral traits beyond the basic purpose.

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 a single short sentence, which is concise and front-loaded. However, it could be slightly more informative without adding verbosity.

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?

An output schema exists (indicated in context), so the description need not explain return values. However, the description is minimal and does not clarify that the expression is a Boolean expression or what 'satisfiable' means in context. The tool is simple, so this score reflects adequate but not comprehensive completeness.

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 the description 'Boolean expression' for the 'expr' parameter. The tool description adds no extra meaning beyond the schema, so baseline score of 3 is appropriate.

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 'Check if expression is satisfiable' uses a specific verb ('Check') and resource ('expression'), clearly indicating the tool's function. It is distinct from sibling tools like sympy_And or sympy_Or, which handle logical operations rather than satisfiability checking.

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 such as sympy_solve for general solving or sympy_And for conjunction. There is no mention of when not to use it or any prerequisites.

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