Skip to main content
Glama

math_matrix

Compute matrix and linear algebra operations: eigenvalues, eigenvectors, determinant, inverse, rref, rank, nullspace, charpoly, transpose, solve linear systems, SVD, LU, QR, diagonalize, and Jordan form.

Instructions

矩阵与线性代数运算。

matrix: 矩阵,格式 '[[a,b],[c,d]]' 或 '[a,b;c,d]'。 operation: 支持的运算: eigenvalues — 特征值 eigenvectors — 特征向量 determinant — 行列式 inverse — 逆矩阵 rref — 简化行阶梯形 rank — 秩 nullspace — 零空间 charpoly — 特征多项式 transpose — 转置 solve_linear — 解线性方程组 Ax=b(需 vector 参数) svd — 奇异值分解 lu — LU 分解 qr — QR 分解 diagonalize — 对角化 jordan — Jordan 标准形 vector: 线性方程组右侧向量,格式 '[a,b,c]',仅 solve_linear 需要。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYes
operationNoeigenvalues
vectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not mention return value structure, error conditions (e.g., singular matrices for inverse, complex eigenvalues), performance implications, or any side effects. The agent lacks critical behavioral context beyond the list of operations.

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 efficiently structured: a brief purpose statement followed by a bulleted list of operations. It front-loads the core idea. However, the list is quite long (17 operations), which slightly reduces conciseness, but the structure remains clear.

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 complexity (many operations, no annotations, no parameter descriptions in schema), the description adequately covers parameters and operation purposes. However, it lacks details on output format, error handling, and specific behavioral nuances (e.g., matrix size limits). The presence of an output schema (unseen) slightly mitigates this gap, but the description alone is not fully complete.

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?

With 0% schema description coverage, the description compensates well: it explains the matrix input format with two examples, enumerates all operations with short descriptions, and clarifies the vector parameter's role for solve_linear. This adds significant value beyond the schema's raw properties.

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 '矩阵与线性代数运算' (matrix and linear algebra operations) and lists 17 specific operations, making the tool's purpose highly specific. It easily distinguishes from sibling tools like math_calculus or math_solve, which cover different domains.

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 description lists operations and explains the 'vector' parameter's usage for solve_linear, providing some guidance. However, it does not explicitly state when to use this tool over alternatives or mention prerequisites (e.g., matrix invertibility for inverse). The implicit domain separation from siblings is clear, but no explicit exclusion or best-practice advice is given.

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/3aKHP/math-mcp'

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