sympy_Nor
Computes the logical NOR of comma-separated symbolic expressions, returning the negation of the logical OR.
Instructions
Logical NOR.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"args": "<args>"
},
"name": "sympy_Nor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | Comma-separated expressions |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/mcp_sympy/tools.py:2023-2037 (handler)The sympy_Nor tool handler: decorated with @mcp.tool(), it parses a comma-separated string of expressions using _sympify and returns the result of sympy's Nor() as a string.
@mcp.tool() def sympy_Nor(args: str) -> str: """Logical NOR. Args: args: Comma-separated expressions Returns: Nor as string Example: >>> sympy_Nor("False, False") "True" """ return str(Nor(*[_sympify(a) for a in args.split(",")])) - src/mcp_sympy/tools.py:2023-2024 (registration)Registration via @mcp.tool() decorator on the mcp = fastmcp.FastMCP('mcp-sympy') instance (line 119).
@mcp.tool() def sympy_Nor(args: str) -> str: - src/mcp_sympy/tools.py:2025-2031 (schema)Docstring describing args parameter as comma-separated expressions and return as Nor string.
"""Logical NOR. Args: args: Comma-separated expressions Returns: Nor as string - src/mcp_sympy/tools.py:114-116 (helper)The _sympify helper function used by sympy_Nor to convert string expressions to SymPy objects.
def _sympify(expr: str) -> sympy.Basic: """Convert string expression to SymPy object.""" return sympy.sympify(expr) - src/mcp_sympy/tools.py:119-119 (registration)FastMCP instance creation (mcp) that provides the @mcp.tool() decorator used to register sympy_Nor.
mcp = fastmcp.FastMCP("mcp-sympy")