Skip to main content
Glama

matrix_operation

Compute common linear algebra operations on a matrix: determinant, inverse, eigenvalues, rank, reduced row echelon form, and transpose.

Instructions

Linear algebra on one matrix: determinant, inverse, eigenvalues, rank, reduced row echelon form, transpose. Prefer this over evaluate_sage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYesMatrix as nested list of numbers. Integers stay exact; pass values from 2^53 up as decimal strings.
sessionNoNamed workspace to use. Workspaces have independent variables; omit for 'default'.default
operationYesOne of: determinant, inverse, eigenvalues, rank, rref, transpose

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

There are no annotations, so the description carries the full burden for behavioral transparency. However, it only lists operations and gives a preference over evaluate_sage; it does not disclose whether the tool modifies session state, whether it works with symbolic entries, or any side effects. The minimal behavioral detail beyond the operation list is insufficient.

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 is a single, dense sentence followed by a one-sentence preference note. It is front-loaded with the core purpose and operation list, and every word earns its place. There is no repetition or filler.

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?

The tool has a moderate complexity with an output schema and full parameter descriptions, but the description omits context about session usage (the session parameter suggests a workspace model) and does not clarify whether a running Sage session is required or if results are stored. Still, for the core calculation purpose, the description is adequate with the schema filling most gaps.

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 description coverage is 100% (all three parameters have descriptions), so the baseline is 3. The description does not add meaning beyond the schema; it repeats the operation names already enumerated in the operation parameter description. 'Reduced row echelon form' is a synonym for 'rref' but not a substantive semantic addition.

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 explicitly states 'Linear algebra on one matrix' followed by a list of specific operations (determinant, inverse, eigenvalues, rank, reduced row echelon form, transpose). It clearly distinguishes this tool from matrix_multiply (one vs. multiple matrices) and from evaluate_sage by saying 'Prefer this over evaluate_sage'.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: for linear algebra on a single matrix. It also says 'Prefer this over evaluate_sage', naming an alternative, and the scope 'on one matrix' implicitly tells when not to use it (e.g., for multi-matrix operations). This meets the explicit when/when-not/alternatives criterion.

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/XBP-Europe/sagemath-mcp'

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