Skip to main content
Glama

matrix_exponentiation

Raise a square matrix to a non-negative integer power using fast exponentiation, with optional modular arithmetic for large-number computations.

Instructions

Raise a square matrix to a non-negative integer power using fast exponentiation, with optional modular arithmetic.

Input Schema

NameRequiredDescriptionDefault
modNoOptional modulus for modular arithmetic
powerYesNon-negative integer exponent (max 1 billion)
matrixYesSquare matrix (max 10x10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully names the algorithm (fast exponentiation) and flags optional modular reduction, implying efficiency and bounded results. However it says nothing about error behavior for non-square or oversized matrices, negative powers, or the shape/type of what is returned.

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?

A single tight sentence, front-loaded with the core operation and appending the optional modifier last. No filler or redundancy.

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?

For a self-contained math function with no output schema and no annotations, the description is only minimally complete: it omits failure modes, constraints, and result semantics that an agent might need. It covers the happy path adequately but leaves behavioral edges unaddressed.

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%, so the schema already documents all three parameters including the modular arithmetic option. The description's mention of "optional modular arithmetic" merely echoes the schema without adding syntax, ranges, or format detail, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and resource ("Raise a square matrix to a non-negative integer power") and even names the algorithm (fast exponentiation). It is fully unambiguous as to outcome but does not differentiate itself from close siblings like matrix_inverse, matrix_operate, or matrix_rank that also manipulate matrices.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over related matrix/modular-arithmetic siblings, nor any stated prerequisites or exclusions. Usage is only implied by the mathematical operation itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools