Skip to main content
Glama
k-ming
by k-ming

matrix_multiply

Multiply two matrices A and B, given as rows of numbers, to compute the matrix product A @ B.

Instructions

矩阵相乘 A (m x n) 与 B (n x p)。

参数: a: 左矩阵,按行组成的列表。 b: 右矩阵,按行组成的列表。

返回: 乘积矩阵 A @ B,按行组成的列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so the description must cover behavior. It describes inputs and output but does not mention dimension mismatch errors or other edge cases. The behavioral disclosure is adequate but not comprehensive.

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 extremely concise with three sentences, each carrying essential information. It is front-loaded with a clear title-like statement and wastes no words.

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 standard matrix multiplication tool, the description covers purpose, parameters, and return format adequately. The presence of an output schema reduces the need to document return structure. Minor omissions like error cases lower completeness slightly.

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 has 0% description coverage, so the description provides essential meaning: a is left matrix and b is right matrix, both specified as lists of rows. This adds clarity beyond the schema's generic array type, though it omits dimensional alignment details.

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 the tool performs matrix multiplication, specifying the dimensions (m x n and n x p) and the output is the product matrix. This distinctively separates it from sibling tools like determinant or matrix_inverse.

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 implies use for multiplying two matrices but provides no explicit guidance on when to use this tool versus alternatives like solve_linear_system or eigen. It lacks context on prerequisites or when not to use it.

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/k-ming/Scientific-computing-MCP'

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