Skip to main content
Glama

Aman-Amith-Shastry-scientific_computation_mcp

svd_decompose

Read-onlyIdempotent
    Computes the Singular Value Decomposition (SVD) of a stored matrix.

    Decomposes the matrix A into A = U @ S @ V^T, where U and V^T are orthogonal
    matrices, and S is a diagonal matrix of singular values.

    Args:
        name (str): The name of the matrix to decompose.

    Returns:
        dict: A dictionary with keys:
            - 'u': the left singular vectors, as nested lists
            - 's': the singular values, as a flat list
            - 'v_t': the right singular vectors transposed, as nested lists

    Raises:
        ValueError: If the matrix is not found or decomposition fails.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the stored matrix to decompose.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"Name of the stored matrix to decompose."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "svd_decomposeDictOutput",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the operation read-only, idempotent, and non-destructive, and the description adds meaningful behavioral detail: it specifies the returned keys and raises ValueError when the matrix is missing or decomposition fails. This adds value without contradicting 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loads the defining formula, and clearly partitions Args/Returns/Raises. Some redundancy with the schema and output schema exists in the Args and Returns sections, but it remains well-structured and the extra error information is useful.

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?

For a one-parameter, read-only, idempotent tool with an output schema, the description covers the operation, mathematical definition, return keys, and failure mode. An agent has everything it needs to select and invoke the tool correctly.

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 documents the single 'name' parameter at 100% coverage, and the description's Args section essentially restates 'matrix to decompose'. No additional parameter semantics are provided beyond the schema, so the 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 states the specific verb 'Computes' and the exact resource 'stored matrix', and defines the operation with the formula A = U @ S @ V^T plus characteristic output keys. This makes it unmistakably distinct from sibling matrix tools such as qr_decompose or compute_eigen, even without naming them.

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

Usage Guidelines4/5

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

The description makes clear that this tool is for computing the SVD of a stored matrix, which gives an agent a clear condition for when to call it. It does not explicitly discuss alternatives or when not to use it, so it stops short of the top score.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.