Skip to main content
Glama

sympy_matrix_eigenvects

Compute eigenvectors of a given matrix using symbolic mathematics. Obtain the eigenvalues and corresponding eigenvectors for algebraic analysis.

Instructions

Compute eigenvectors of a matrix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYesMatrix string

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for 'sympy_matrix_eigenvects'. It converts the input string to a SymPy matrix using _sympify, then calls .eigenvects() on it and returns the result as a string.
    def sympy_matrix_eigenvects(matrix: str) -> str:
        """Compute eigenvectors of a matrix.
    
        Args:
            matrix: Matrix string
    
        Returns:
            Eigenvectors as string
    
        Example:
            >>> sympy_matrix_eigenvects("Matrix([[1, 0], [0, 2]])")
            "(1, 1, [Matrix([[1], [0]]), Matrix([[0], [1]])])"
        """
        m = _sympify(matrix)
        return str(m.eigenvects())
  • The _sympify helper function used to convert string input to a SymPy object before calling eigenvects().
    def _sympify(expr: str) -> sympy.Basic:
        """Convert string expression to SymPy object."""
        return sympy.sympify(expr)
  • The @mcp.tool() decorator that registers the function as an MCP tool. The mcp instance is defined at line 119.
    @mcp.tool()
    def sympy_matrix_eigenvects(matrix: str) -> str:
Behavior2/5

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

With no annotations, the description must disclose behavior but only says 'Compute eigenvectors.' It omits details like handling of symbolic matrices, return structure, or potential limitations.

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 concise sentence, front-loading the purpose. While brief, it contains no fluff and is structured appropriately for a simple tool.

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 simple input schema and existence of an output schema, the description could be more complete by summarizing the output (e.g., eigenvectors with multiplicities). It is adequate but not rich.

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 already describes the single parameter 'matrix' with 100% coverage. The description adds no further meaning about its format or representation, so it meets the baseline.

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 clearly states the tool computes eigenvectors of a matrix, distinguishing it from related tools like sympy_matrix_eigenvals (eigenvalues). However, it lacks specifics on the output format (e.g., symbolic, multiplicity).

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 given on when to use this tool versus alternatives, such as sympy_matrix_eigenvals. It does not mention context prerequisites or exclusions.

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