Skip to main content
Glama

trigsimp_expression

Apply trigonometric identities to simplify expressions, reducing complex forms like sin²(x)+cos²(x) to 1.

Instructions

    Simplify trigonometric expressions.

    ═══════════════════════════════════════════════════════════════════════
    🆕 PHASE 1 - NOT IN SYMPY-MCP OR NSFORGE v0.2.3!
    ═══════════════════════════════════════════════════════════════════════

    Applies trigonometric identities to simplify expressions.

    Use cases:
    - Simplify sin²+cos² → 1
    - Simplify tan(x) → sin(x)/cos(x)
    - Oscillating chemical reactions
    - Phase analysis in PK/PD

    Args:
        expression: Expression to simplify
        deep: Apply to subexpressions (default: False)
        recursive: Apply repeatedly (default: False)
        method: Simplification method
            - "matching": Pattern matching (default, fast)
            - "groebner": Gröbner basis (slower, more powerful)
            - "combined": Try both

    Returns:
        Simplified expression with LaTeX

    Examples:
        # Pythagorean identity
        trigsimp_expression("sin(x)**2 + cos(x)**2")
        → {"result": "1", ...}

        # Tan identity
        trigsimp_expression("sin(x)/cos(x)")
        → {"result": "tan(x)", ...}

        # Double angle
        trigsimp_expression("2*sin(x)*cos(x)")
        → {"result": "sin(2*x)", ...}

        # Oscillating kinetics
        trigsimp_expression("sin(omega*t)**2 + cos(omega*t)**2")
        → {"result": "1", ...}
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deepNo
methodNomatching
recursiveNo
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It explains the return format ('Simplified expression with LaTeX'), method behavior (matching/groebner/combined), and gives examples, but it doesn't mention edge cases, potential failures, or whether the operation is read-only. It is reasonably transparent but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

The description is overlong and contains a large 'PHASE 1' banner that is irrelevant to tool usage. The Args section repeats schema structure, and the examples, while useful, take up space. The description is not front-loaded and includes marketing-style noise, so it fails conciseness.

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?

Despite the noise, the description is functionally complete: it provides use cases, parameter semantics, return format, and multiple examples. Since an output schema exists, the return values are already structured. The main gap is the lack of error-handling or edge-case notes, but the core information for a simplification tool is present.

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 description coverage is 0%, so the description fully compensates by explaining each parameter: 'expression', 'deep', 'recursive', and especially 'method' with its three enum-like options. It also clarifies defaults, which the schema only shows as raw values. This adds substantial meaning beyond the input schema.

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 clearly states it simplifies trigonometric expressions using identities, with concrete use cases and examples. It distinguishes itself from sibling simplification tools (powsimp, radsimp, combsimp) by focusing specifically on trig identities.

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 provides clear use cases (Pythagorean identity, tan expansion, oscillation analysis) but never explicitly states when not to use this tool or suggests alternatives. It implies usage through examples but lacks exclusion criteria or comparison to other simplification tools.

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