Skip to main content
Glama
sdiehl
by sdiehl

matrix_eigenvalues

Calculate the eigenvalues of a matrix using symbolic algebra. Input a matrix key to obtain eigenvalues expressed as a dictionary mapping values to their multiplicities.

Instructions

Calculates the eigenvalues of a matrix using SymPy's eigenvals method.

Args:
    matrix_key: The key of the matrix to calculate eigenvalues for.

Example:
    # Create a matrix
    matrix_key = create_matrix([[1, 2], [2, 1]])

    # Calculate its eigenvalues
    evals_key = matrix_eigenvalues(matrix_key)

Returns:
    A key for the eigenvalues expression (usually a dictionary mapping eigenvalues to their multiplicities).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrix_keyYes
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions using SymPy's eigenvals method and describes the return format, which adds some behavioral context. However, it lacks details on error conditions (e.g., non-square matrices), computational complexity, or side effects. For a mathematical computation tool with zero annotation coverage, this is insufficient disclosure of behavioral traits.

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 appropriately sized and front-loaded with the core functionality. It uses sections (Args, Example, Returns) for structure, making it easy to parse. The example is helpful but slightly verbose; overall, most sentences earn their place, though the Returns section could be more concise.

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 tool's moderate complexity (mathematical computation), no annotations, no output schema, and low schema coverage, the description is partially complete. It covers the basic operation and return format but lacks error handling, limitations, or integration with sibling tools. The example helps, but more context on usage in the broader tool ecosystem would improve completeness.

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

Parameters4/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that matrix_key refers to 'the key of the matrix to calculate eigenvalues for' and provides an example showing how to obtain it via create_matrix. This clarifies the parameter's purpose and usage context, compensating well for the schema's lack of documentation.

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 calculates eigenvalues of a matrix using SymPy's eigenvals method, which is a specific verb+resource combination. It distinguishes from some siblings like matrix_determinant or matrix_inverse, though not explicitly from matrix_eigenvectors which is closely related. The purpose is well-defined but could be more precise about differentiation from eigenvectors.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions a sibling tool create_matrix in an example, but does not explain when to choose eigenvalues over eigenvectors, determinants, or other matrix operations. There are no explicit when/when-not instructions or prerequisites stated.

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

Related 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/sdiehl/sympy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server