Skip to main content
Glama

derivation_load_formula

Load a mathematical formula into the current session for symbolic derivation and verification, accepting SymPy strings, LaTeX, or structured dictionaries with variable metadata.

Instructions

    載入公式到當前會話

    支援多種格式輸入:
    - SymPy 字串: "C_0 * exp(-k*t)"
    - LaTeX: "C_0 e^{-kt}" 或 "\frac{dC}{dt} = -kC"
    - 字典: {"expression": "...", "variables": {...}}

    Args:
        formula: 公式(多種格式)
        formula_id: 公式 ID(可選,自動生成)
        source: 來源標記 ("user_input", "textbook", "sympy_builtin", "derived", "external_mcp")
        source_detail: 詳細來源(如 "Goodman & Gilman Ch.2")
        name: 公式名稱
        description: 公式描述

    Returns:
        載入結果

    Examples:
        # SymPy 格式
        derivation_load_formula("C_0 * exp(-k*t)", formula_id="one_compartment")

        # LaTeX 格式
        derivation_load_formula("\frac{dC}{dt} = -k \cdot C")

        # 字典格式(含變數資訊)
        derivation_load_formula({
            "expression": "k_ref * exp(E_a/R * (1/T_ref - 1/T))",
            "name": "Arrhenius temperature correction",
            "variables": {
                "k_ref": {"description": "Reference rate constant", "unit": "1/h"},
                "E_a": {"description": "Activation energy", "unit": "J/mol"},
                "T": {"description": "Temperature", "unit": "K"},
            }
        })
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
sourceNouser_input
formulaYes
formula_idNo
session_idNo
descriptionNo
source_detailNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

There are no annotations, so the description carries the full burden. It discloses that the tool loads into the 'current session' and supports various input formats, which is helpful. However, it does not mention side effects such as whether an active session is required, what happens if the formula_id already exists, or the exact return value beyond 'load result'. This is a moderate gap.

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: it opens with a clear one-line purpose, then lists supported formats, parameters with examples, and returns. Every section adds value, and the three examples are practical and educational. There is no redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is rich for input formats and parameter semantics but lacks important context: it does not state that a session must exist or that the session_id parameter can be used to target a specific session. The return value description is also vague ('load result'), though an output schema may cover that. Overall, it is adequate but incomplete for a 7-parameter tool.

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. Most parameters (formula, source, source_detail, name, description) are meaningfully explained, with the dict example showing detailed variable structure. However, session_id is entirely omitted from the description, which is a notable gap given it is a schema parameter.

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 the tool loads a formula into the current session, with a specific verb ('load') and resource ('formula'). It further distinguishes itself from sibling tools by detailing supported input formats (SymPy, LaTeX, dict) and provides concrete examples, making the purpose unmistakable.

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 gives clear context on when to use this tool (loading formulas into a derivation session) and shows multiple usage scenarios via examples. However, it does not explicitly exclude alternatives or name when to use other tools like formula_search or derivation_get_saved, so it lacks explicit exclusionary guidance.

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