Skip to main content
Glama

Aman-Amith-Shastry-scientific_computation_mcp

multiply_matrices

Read-onlyIdempotent
    Performs matrix multiplication between two stored tensors, computing name_a @ name_b.

    Args:
        name_a (str): The name of the first tensor.
        name_b (str): The name of the second tensor.

    Returns:
        Tensor: The result of matrix multiplication.

    Raises:
        ValueError: If either tensor is not found or their shapes are incompatible.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_aYesName of the left-hand tensor in the product.
name_bYesName of the right-hand tensor in the product.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / name_a / description
      Added value: +"Name of the left-hand tensor in the product."
    • addedInput schema / properties / name_b / description
      Added value: +"Name of the right-hand tensor in the product."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "items": {
      +            "items": {
      +              "type": "number"
      +            },
      +            "type": "array"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "items": {
      +            "items": {
      +              "items": {
      +                "type": "number"
      +              },
      +              "type": "array"
      +            },
      +            "type": "array"
      +          },
      +          "type": "array"
      +        }
      +      ],
      +      "title": "Result"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "multiply_matricesOutput",
      +  "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 declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds valuable behavioral context: it raises ValueError if tensors are not found or shapes are incompatible, and returns a Tensor. This goes beyond annotations and helps the agent anticipate failure conditions.

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 a concise docstring with clear sections (Args, Returns, Raises). The main operation is stated first, and each section is minimal and relevant. No wasted words; the structure is ideal for an agent to parse quickly.

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?

The description covers the essential context: operation, parameters, return type, and error conditions. Since an output schema exists, the description doesn't need to detail the return structure. It might mention storage semantics ('stored tensors') but is otherwise complete for a straightforward matrix multiplication tool. A 4 reflects a minor omission—no mention of how to obtain tensor names or if any preconditions exist—but these are likely covered by sibling tools and context.

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 coverage is 100%, and both parameters (name_a and name_b) are already described in the schema. The description simply restates them without adding new meaning (e.g., format, constraints, or usage nuances). Baseline of 3 is correct because the schema carries the semantic load.

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 a specific verb and resource: 'Performs matrix multiplication between two stored tensors'. It clearly differentiates from siblings like add_matrices and subtract_matrices by explicitly naming the operation (name_a @ name_b). No ambiguity about what the tool does.

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 clearly implies when to use this tool (when matrix multiplication is needed) and the operation is self-contained. However, it does not explicitly mention alternatives or exclusion criteria (e.g., 'for element-wise multiplication use...'). Since the purpose is unambiguous and siblings are distinct, this is a minor gap, so a 4 is appropriate.

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.