Skip to main content
Glama

Matrix Transpose

matrix_transpose
Read-onlyIdempotent

Swap the rows and columns of a matrix to compute its transpose. Accepts a 2D list of numbers.

Instructions

Transpose a matrix (swap rows and columns).

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

Examples: matrix_transpose([[1, 2, 3], [4, 5, 6]]) matrix_transpose([[1], [2], [3]])

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
difficultyYes
original_colsYes
original_rowsYes
result_matrixYes
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, indicating a safe read-only operation. The description adds value by disclosing the dependency on NumPy and the potential ValueError. This provides useful behavioral context beyond the annotations.

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?

Description is extremely concise: one line for purpose, one line for dependency, and two examples. Every element adds value without verbosity. Front-loaded with the core action.

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

Completeness5/5

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

Given the tool's simplicity, high schema coverage, rich annotations, and presence of an output schema, the description adequately covers all necessary context. It mentions the critical dependency and provides examples, making it complete for typical usage.

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%, and the schema already defines the 'matrix' parameter clearly. The description adds examples but no additional semantic nuance beyond what the schema provides. Baseline 3 is appropriate.

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?

Description clearly states the verb 'Transpose' and the resource 'matrix' with an explanatory phrase 'swap rows and columns'. The tool's function is unambiguous and distinct from sibling matrix operations like determinant, inverse, and multiply.

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 usage through the name and mathematical context (e.g., transposing a matrix). It does not explicitly state when to use this tool versus alternatives, nor does it provide exclusions. The examples help but do not constitute clear usage guidance beyond the basic operation.

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/clouatre-labs/math-mcp-learning-server'

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