Skip to main content
Glama

generate_sympy_script

Create a runnable Python script that reproduces symbolic derivations from given expressions and operations like simplify, solve, differentiate, and integrate.

Instructions

    Generate a standalone SymPy script for a computation.

    This generates a complete, runnable Python script that can be
    executed independently to reproduce the derivation.

    Args:
        expressions: List of {"name": str, "expr": str, "description": str}
        operations: List of operations to perform
            {"op": "simplify|solve|diff|integrate", "input": str, ...}

    Returns:
        Complete Python script

    Example:
        generate_sympy_script(
            expressions=[
                {"name": "momentum", "expr": "m1*v1 + m2*v2", "description": "Total momentum"},
            ],
            operations=[
                {"op": "solve", "input": "momentum = (m1+m2)*v_f", "for": "v_f"},
            ]
        )
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes
expressionsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It clearly states that the tool generates a script (not executes it), and that the script is standalone and runnable, indicating a read-only generation operation. It also lists supported operation types. It doesn't disclose potential failure modes, but for a generation tool, the core behavior is well covered.

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 well-structured with a one-line summary, detailed parameter breakdown, return description, and a clear example. Every sentence adds value, and the formatting (Args/Returns/Example) makes it easy to scan. The length is appropriate for the tool's complexity.

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?

Given the vague input schema (only arrays of objects) and no annotations, the description provides the necessary context to invoke the tool correctly, including parameter formats, allowed operations, and the return type. The example reinforces the expected usage. The description is sufficiently complete for the tool's complexity.

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

Parameters5/5

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

Schema coverage is 0%, so the description completely compensates by defining the structure of the 'expressions' list (name, expr, description) and the 'operations' list with supported op values (simplify, solve, diff, integrate) and 'input' field. The example further clarifies how parameters are used, adding significant meaning beyond the bare schema.

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 clearly states it generates a standalone SymPy script for a computation, with a specific verb and resource. It explains the script is complete and runnable. However, it doesn't explicitly differentiate from sibling tools like derivation_export_for_sympy or generate_python_function, though the 'standalone' phrasing offers some distinction.

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 describing the task (generating a script for a computation) and provides a concrete example, but it never explicitly states when to use this tool versus alternatives or any exclusions. No alternative tools are mentioned, leaving the agent to infer the appropriate context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/nsforge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server