Skip to main content
Glama
Symbolic Algebra MCP Server

Symbolic Algebra MCP Server

create_matrix

Constructs a SymPy matrix from row data with numeric or symbolic entries, storing it under an optional variable name for later symbolic algebra operations.

Instructions

Creates a SymPy matrix from the provided data.

Args:
    matrix_data: A list of lists representing the rows and columns of the matrix.
                Each element can be a number or a string expression.
    matrix_var_name: Optional name for storing the matrix. If not provided, a
                     sequential name will be generated.

Example:
    # Create a 2x2 matrix with numeric values
    matrix_key = create_matrix([[1, 2], [3, 4]], "M")

    # Create a matrix with symbolic expressions (assuming x, y are defined)
    matrix_key = create_matrix([["x", "y"], ["x*y", "x+y"]])

Returns:
    A key for the stored matrix.

Input Schema

NameRequiredDescriptionDefault
matrix_dataYes
matrix_var_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 behavioral burden. It usefully discloses that the matrix is stored and that a key is returned, and that an optional name defaults to a sequential generated name, but it omits error behavior, storage scope, and naming collision handling.

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 front-loaded with the purpose and structured into Args, Example, and Returns sections. The example earns its place by showing symbolic expressions, though the overall text is slightly longer than strictly necessary.

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?

Given two parameters, no annotations, and an output schema, the description is complete enough for correct invocation. It covers parameter meaning and storage behavior, leaving only minor gaps around sibling-tool selection and error semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains that matrix_data is a list of rows/columns with numeric or string expression elements, and that matrix_var_name is an optional storage name with an auto-generated fallback, covering both parameters meaningfully.

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 specific verb and resource: "Creates a SymPy matrix from the provided data." It is clearly distinguishable from sibling matrix operations like matrix_inverse or matrix_determinant, though it does not explicitly name those alternatives.

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?

Usage is implied through examples showing matrix creation with numeric and symbolic entries, but there is no explicit guidance on when to use this tool versus related tools or what prerequisites must be met.

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