Skip to main content
Glama
Symbolic Algebra MCP Server

Symbolic Algebra MCP Server

matrix_eigenvalues

Calculates a matrix's eigenvalues symbolically and returns a key to the resulting expression, supporting equation solving and matrix analysis.

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

NameRequiredDescriptionDefault
matrix_keyYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose the key-based state pattern and that the result is 'usually a dictionary mapping eigenvalues to their multiplicities', which is genuinely informative. It omits whether computation is exact/symbolic vs numeric, behavior on non-diagonalizable or non-square matrices, and cost on large matrices.

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 purpose is front-loaded in the first sentence, followed by a compact Args/Example/Returns block that is scannable. The example is short and directly reinforces the argument semantics, so the length is justified, though the Returns section partly duplicates the output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter, non-destructive computation tool with an output schema present, the description covers purpose, argument meaning, invocation example, and result shape. Missing only edge-case behavior (non-square input, symbolic results), which keeps it from a 5.

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?

Schema description coverage is 0%, so the description must compensate, and it does: 'matrix_key: The key of the matrix' clarifies that the argument is a handle to a previously created matrix rather than a raw matrix literal, and the example shows exactly how such a key is produced. That is the key semantic an agent could otherwise get wrong.

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 first sentence names a specific verb and resource ('Calculates the eigenvalues of a matrix') and even names the underlying method (SymPy eigenvals), which makes it distinguishable from matrix_eigenvectors and matrix_determinant by name alone. It stops short of explicitly contrasting itself with those siblings, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The worked example implicitly tells the agent the precondition (a matrix key must first come from create_matrix), which is useful workflow guidance. However, there is no explicit statement of when to use this versus matrix_eigenvectors, matrix_determinant, or matrix_inverse, and no exclusions or failure conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.