Skip to main content
Glama

sympy_Line

Create a symbolic line by specifying two points. The tool computes the line equation using SymPy's symbolic mathematics.

Instructions

Create a line through two points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
point1YesFirst point
point2YesSecond point

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the sympy_Line tool. It takes two string point coordinates, sympifies them, and creates a SymPy Line object, returning its string representation.
    @mcp.tool()
    def sympy_Line(point1: str, point2: str) -> str:
        """Create a line through two points.
    
        Args:
            point1: First point
            point2: Second point
    
        Returns:
            Line as string
    
        Example:
            >>> sympy_Line("(0, 0)", "(1, 1)")
            "Line2D(Point2D(0, 0), Point2D(1, 1))"
        """
        p1 = _sympify(point1)
        p2 = _sympify(point2)
        return str(Line(p1, p2))
  • Import of Line from sympy, required for the Line constructor used in sympy_Line.
    Line,
  • The FastMCP instance (mcp) used to register the tool via the @mcp.tool() decorator.
    mcp = fastmcp.FastMCP("mcp-sympy")
  • The _sympify helper function that converts string expressions to SymPy objects, used by sympy_Line.
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
Behavior2/5

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

With no annotations, the description bears full burden but only states creation, omitting details about return type, coordinate assumptions, or side effects.

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?

Extremely concise (6 words) but under-specified; not an ideal balance of conciseness and informativeness.

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?

Fails to explain output, point format, or coordinate system context, leaving significant gaps for correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions are tautological ('First point', 'Second point'), adding no format or constraint details despite 100% coverage.

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?

Description clearly specifies verb (Create) and resource (line) with method (through two points), distinguishing it from sibling tools like sympy_Circle or sympy_Point.

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 or prerequisites for points, leaving the agent to infer usage context.

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