Skip to main content
Glama

Aman-Amith-Shastry-scientific_computation_mcp

subtract_matrices

Read-onlyIdempotent
    Subtracts one stored tensor from another element-wise, computing name_a - name_b.

    Args:
        name_a (str): The name of the tensor to subtract from (the minuend).
        name_b (str): The name of the tensor to subtract (the subtrahend).

    Returns:
        Tensor: The result of element-wise subtraction.

    Raises:
        ValueError: If the tensor names are not found or shapes are incompatible.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_aYesName of the tensor to subtract from (the minuend).
name_bYesName of the tensor to subtract (the subtrahend).

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 tensor to subtract from (the minuend)."
    • addedInput schema / properties / name_b / description
      Added value: +"Name of the tensor to subtract (the subtrahend)."
    • 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": "subtract_matricesOutput",
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the error condition (ValueError for missing names or incompatible shapes), which is useful behavioral context beyond the annotations. However, it doesn't disclose details like whether the result is stored or returned transiently, or any side effects on the stored tensors.

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 and front-loaded with the core operation in the first sentence. The Args/Returns/Raises sections are standard and add necessary detail without bloat. It earns a 4 because it is efficient, though the Args section largely duplicates the schema.

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 tool is simple (2 params, no nested objects) and has an output schema, so the description doesn't need to explain return values. The error conditions are disclosed, and the operation is fully specified. It is complete for an agent to call correctly, though it could mention whether the result is stored or returned.

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 both parameters fully. The description repeats the parameter meanings ('minuend' and 'subtrahend') but adds no new semantic information beyond what the schema provides. Baseline 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 a specific verb ('subtracts'), a specific resource ('stored tensor'), and the exact operation ('computing name_a - name_b'). It clearly distinguishes itself from siblings like add_matrices and multiply_matrices by naming the element-wise subtraction operation.

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 implies usage by defining the two tensor names and the operation, but it does not explicitly state when to use this tool versus alternatives like add_matrices or multiply_matrices. The context is clear enough for an agent to infer the use case, but there is no explicit when/when-not guidance.

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.