Skip to main content
Glama

Matrix Eigenvalues

matrix_eigenvalues
Read-onlyIdempotent

Compute eigenvalues for any square matrix to understand its structural properties. Pass a 2D array of numbers and receive the eigenvalues directly.

Instructions

Calculate the eigenvalues of a square matrix.

Note: Requires NumPy. Raises ValueError if NumPy is unavailable.

Examples: matrix_eigenvalues([[4, 2], [1, 3]]) matrix_eigenvalues([[3, 0, 0], [0, 5, 0], [0, 0, 7]]) # Diagonal matrix

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYes2D list of numbers representing a square matrix. Each inner list is a row. Example: [[4, 2], [1, 3]]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes
errorNo
topicYes
successYes
difficultyYes
eigenvaluesNo
eigenvectorsNo
complex_valuesNo
complex_eigenvalues_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so no contradiction. The description adds valuable behavioral context by noting 'Requires NumPy' and 'Raises ValueError if NumPy is unavailable', which is useful operational information beyond the annotations. It also provides concrete examples of invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description leads with the core purpose in the first sentence, followed by a brief dependency note and two illustrative examples. Every sentence contributes value with no redundancy or filler. It is appropriately sized for the tool's simplicity.

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 tool with an output schema present, the description covers the main operational context: dependency on NumPy, error behavior, and usage examples. It does not mention edge cases like non-square matrices or the ordering of eigenvalues, but given the schema already specifies 'square matrix', this is a minor gap.

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?

Schema coverage is 100%, and the schema already describes the matrix parameter with an example identical to the first example in the description. The description adds no new semantic information about the parameter; it merely repeats the schema's example and adds a diagonal matrix variant. Baseline of 3 applies.

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?

The description clearly states 'Calculate the eigenvalues of a square matrix' with a specific verb and resource. It unambiguously distinguishes from sibling matrix tools like matrix_determinant, matrix_inverse, and matrix_multiply by focusing on eigenvalues.

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

Usage Guidelines4/5

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

The tool's purpose implies when to use it (when eigenvalues are needed), and the sibling names provide context that this is the eigenvalue-specific tool. However, it does not explicitly state when not to use it or name alternatives, such as 'use matrix_determinant for determinants'.

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