Skip to main content
Glama

radsimp_expression

Rationalizes denominators and simplifies radical expressions to exact simplified forms.

Instructions

    Simplify radicals (square roots, cube roots, etc.).

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

    Rationalizes denominators and simplifies radical expressions.

    Use cases:
    - Rationalize denominators: 1/(√3+√2)
    - Simplify nested radicals
    - Standard form for half-life calculations
    - Geometric mean calculations

    Args:
        expression: Expression to simplify
        symbolic: Allow symbolic radicals (default: True)
        max_terms: Maximum terms in denominator for rationalization

    Returns:
        Simplified expression with LaTeX

    Examples:
        # Rationalize denominator
        radsimp_expression("1/(sqrt(3) + sqrt(2))")
        → {"result": "-sqrt(2) + sqrt(3)", ...}

        # Simplify radical
        radsimp_expression("sqrt(12)")
        → {"result": "2*sqrt(3)", ...}

        # PK: Half-life with roots
        radsimp_expression("ln(2)/sqrt(k1*k2)")
        → {"result": "sqrt(k1*k2)*ln(2)/(k1*k2)", ...}

        # Nested radicals
        radsimp_expression("sqrt(2 + sqrt(2))")
        → Attempts simplification
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolicNo
max_termsNo
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. It discloses key behaviors: rationalizes denominators, attempts simplification of nested radicals, and returns LaTeX output. It also explains the effect of 'symbolic' and 'max_terms' parameters. It does not discuss failure modes or edge cases, but for a pure math simplification tool this is adequate.

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 structured with clear sections (Args, Returns, Examples) and front-loaded with the primary purpose. The banner and emojis add visual noise but do not obscure content. It is longer than strictly necessary, but every section contributes to usability.

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?

The tool is simple, but the description is thorough: it explains the return format ('Simplified expression with LaTeX'), gives four illustrative examples including edge cases like nested radicals, and enumerates all parameters. Given the output schema exists, the description fully covers what the agent needs to know to invoke it correctly.

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 explicitly explains all three parameters: 'expression: Expression to simplify', 'symbolic: Allow symbolic radicals', and 'max_terms: Maximum terms in denominator for rationalization'. This adds meaningful semantics beyond the schema's type/default information.

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 explicitly states 'Simplify radicals (square roots, cube roots, etc.)' and 'Rationalizes denominators and simplifies radical expressions,' using a specific verb (simplify/rationalize) and resource (radical expressions). It clearly distinguishes itself from sibling simplification tools (e.g., trigsimp_expression, powsimp_expression) by focusing on radicals.

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 concrete use cases (rationalize denominators, simplify nested radicals, half-life calculations, geometric mean) and examples that indicate when to use the tool. However, it does not explicitly mention alternatives or when not to use it, but the use cases are clear enough to infer applicability.

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