Skip to main content
Glama

Matrix exponential

singularis_matrix_exponential
Idempotent

Compute e^{tA} for a square matrix or its action e^{tA}v on a vector, with a residual check. Use for time evolution, Markov chains, linear ODEs, and graph diffusion.

Instructions

Compute the matrix exponential e^{tA} of a square matrix, or its action e^{tA} v on a vector when a vector is given: time evolution, continuous-time Markov chains and generator matrices (rating migration), linear ODE systems, graph diffusion. Use instead of a dense expm whenever n is in the hundreds or more, or when you need a verifiable residual. Inputs: matrix inline or path; t (default 1); optional vector. Returns the matrix (or vector) plus a residual check. Cost scales with n^3.

Input Schema

NameRequiredDescriptionDefault
tNo
pathNo
matrixNo
vectorNo
vector_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.3/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing the o(n^3) cost profile, that a residual check is returned alongside the result, and that the matrix may be supplied inline or via a path. It does not explain what happens if both matrix and path are given, or that non-square/degenerate input is rejected. The description does not contradict the annotations (it never claims read-only), so no contradiction flag.

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?

Front-loads the operation, then use cases, then the alternative-selection rule, then inputs, then return and cost. Dense but every clause carries information; only the bare field list ('Inputs: matrix inline or path; t (default 1); optional vector') is slightly telegraphic.

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?

With an output schema present, the description need not detail return values, and it still notes the residual check. It covers use cases, the alternative, cost, and most inputs; the gaps are the undocumented vector_path parameter and the absence of any validity constraints on the matrix.

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 0%, so the description carries the burden and does compensate partially: it explains matrix may be inline or a path, that t defaults to 1, and that vector is optional (enabling the e^{tA}v mode). However vector_path (a fifth parameter that overrides/augments vector) is never mentioned, nor is the required square shape or the t-scaling semantics.

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?

States a precise mathematical verb and resource ('Compute the matrix exponential e^{tA} of a square matrix, or its action e^{tA} v'), then names concrete application domains (CTMC generators, linear ODEs, graph diffusion). It explicitly distinguishes itself from a dense expm sibling, so an agent can select it without ambiguity.

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

Usage Guidelines5/5

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

Gives an explicit selection rule: 'Use instead of a dense expm whenever n is in the hundreds or more, or when you need a verifiable residual.' This states when this tool wins over the obvious alternative and enumerates the problem classes it targets.

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