Skip to main content
Glama

formula_get

Retrieve complete formula details from Wikidata, BioModels, or SciPy by ID, including LaTeX, SymPy expressions, variable definitions, units, and source URLs.

Instructions

    獲取公式詳細資訊

    根據 ID 獲取完整的公式資訊,包括 LaTeX、SymPy 表達式、變數定義等。

    Args:
        formula_id: 公式識別碼
                   - Wikidata: Q 號(如 "Q179057")
                   - BioModels: 模型 ID(如 "BIOMD0000000012")
                   - SciPy: 常數名(如 "speed_of_light")
        source: 資料來源
               - "wikidata": Wikidata(預設)
               - "biomodels": BioModels
               - "scipy": SciPy 常數

    Returns:
        {
            "success": true,
            "formula": {
                "id": "Q179057",
                "name": "Reynolds number",
                "latex": "Re = \frac{\rho v L}{\mu}",
                "sympy_str": "rho * v * L / mu",
                "variables": {
                    "rho": {"description": "密度", "unit": "kg/m³"},
                    "v": {"description": "流速", "unit": "m/s"},
                    "L": {"description": "特徵長度", "unit": "m"},
                    "mu": {"description": "動力黏度", "unit": "Pa·s"}
                },
                "source": "wikidata",
                "url": "https://www.wikidata.org/wiki/Q179057"
            }
        }

    Example:
        # 獲取 Wikidata 公式
        formula_get("Q179057", source="wikidata")

        # 獲取 BioModels 模型
        formula_get("BIOMD0000000012", source="biomodels")

        # 獲取物理常數
        formula_get("speed_of_light", source="scipy")
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNowikidata
formula_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

無 annotations,描述需承擔行為揭露責任。描述詳述回傳結構與範例,但未明確聲明唯讀性質、錯誤處理或 ID 不存在時的行為,遺漏部分安全與失敗語意。

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?

描述包含多個段落與範例,結構清楚且所有內容皆與使用相關,例如 Args、Returns、Example 分段。但篇幅稍長,部分範例可精簡,整體仍適中。

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?

整體涵蓋目的、參數、回傳結構與使用範例,對一個查詢工具而言已充分;但缺乏錯誤情境與副作用說明,加上無 annotations,未達非常完整的程度。

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 未提供任何描述,而描述中對 formula_id 與 source 的格式、來源選項、預設值均詳細說明,並提供各來源的具體範例,大幅補充參數語意,遠超出 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?

描述以明確動詞「獲取」指出工具功能為依 ID 取得公式完整資訊,並列出含 LaTeX、SymPy 等內容,與兄弟工具(如 formula_search)形成區別。即使使用中文,仍清楚傳達工具用途與範圍。

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?

提供明確使用情境:當已有公式 ID 時可呼叫,並說明不同來源的 ID 格式與預設值。雖未直接寫出與替代工具的取捨,但從語境可推斷此工具適用於已知 ID 的查詢,無需額外搜尋。

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