Skip to main content
Glama

Matrix Determinant

matrix_determinant
Read-onlyIdempotent

Compute the determinant of a square matrix to assess invertibility and scaling factor.

Instructions

Calculate the determinant of a square matrix.

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

Examples: matrix_determinant([[1, 2], [3, 4]]) matrix_determinant([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) # Identity matrix

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes
topicYes
difficultyYes
determinantYes
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description adds value by noting the NumPy dependency and the ValueError if unavailable. This goes beyond the annotations without contradicting them.

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: one sentence for purpose, a note, and two examples. It is front-loaded and every sentence earns its place without unnecessary verbosity.

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?

Given that an output schema exists, the description does not need to explain return values. It covers purpose, dependency, error handling, and examples. Missing explicit mention of error for non-square matrices, but overall complete.

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?

The input schema already has a comprehensive description for the 'matrix' parameter (100% coverage). The description does not add additional meaning beyond what the schema provides, so a baseline of 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?

The description clearly states 'Calculate the determinant of a square matrix,' using a specific verb and resource. It distinguishes from sibling tools like matrix_inverse and matrix_eigenvalues by focusing on determinant calculation.

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 provides examples and notes a dependency (NumPy) but does not explicitly contrast with siblings or specify when to use this tool over alternatives. Usage context is implied but not explicit.

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