Skip to main content
Glama

powsimp_expression

Simplify powers and exponentials by combining bases and exponents using algebraic rules, reducing expressions like x^2 * x^3 to x^5.

Instructions

    Simplify powers and exponentials.

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

    Combines and simplifies powers using algebraic rules.

    Use cases:
    - Combine exponentials: exp(x)*exp(y) → exp(x+y)
    - Simplify powers: x²·x³ → x⁵
    - Nested powers: (x^a)^b → x^(ab)

    Args:
        expression: Expression to simplify
        deep: Apply to subexpressions (default: False)
        combine: How to combine bases
            - "all": Combine all (default)
            - "base": Only combine same base
            - "exp": Only exponentials
        force: Force transformation even if not valid for all values

    Returns:
        Simplified expression with LaTeX

    Examples:
        # Combine powers
        powsimp_expression("x**2 * x**3")
        → {"result": "x**5", ...}

        # Nested powers
        powsimp_expression("(x**a)**b")
        → {"result": "x**(a*b)", ...}

        # Exponentials
        powsimp_expression("exp(x)*exp(y)")
        → {"result": "exp(x + y)", ...}

        # PK: Combine elimination terms
        powsimp_expression("exp(-k*t)*exp(-k*τ)")
        → {"result": "exp(-k*(t + τ))", ...}
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deepNo
forceNo
combineNoall
expressionYes

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 behavioral disclosure. It explains the effects of 'deep', 'combine', and especially 'force' (which overrides validity assumptions), and states the return format. This goes beyond the bare schema and gives useful context for the tool's behavior.

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 well-organized with clear sections for purpose, use cases, arguments, return value, and examples. The 'PHASE 1' banner adds minor noise but does not detract significantly. It is slightly long but every section contributes useful information for the intended 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 presence of an output schema and the detailed parameter explanations, the description is complete for an agent to correctly invoke the tool. It includes example calls and results, covers all parameters, and describes the return format. No critical information is missing.

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?

The schema lacks parameter descriptions (0% coverage), so the description fully compensates by explaining each parameter: 'expression', 'deep', 'combine' with its allowed values ('all', 'base', 'exp'), and 'force'. It also provides defaults and examples, making parameter usage unambiguous.

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 opens with 'Simplify powers and exponentials,' a specific verb+resource statement. It further clarifies by listing concrete use cases like combining exponentials and simplifying powers, which distinguishes it from sibling simplification tools such as trigsimp_expression or radsimp_expression.

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 provides explicit use cases for when to apply the tool, such as combining powers, simplifying nested powers, and handling exponentials. However, it does not explicitly mention when not to use it or compare it to alternative simplification tools, so it lacks formal exclusions.

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