Skip to main content
Glama

add_formula

Add or update calculation formulas in ELN templates by binding variables to form fields and using built-in functions to compute results and write them to specified paths.

Instructions

添加或更新计算公式。ELN 内置 22 个函数。详细语法见 Skill: expression-engine.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo已有公式 ID(更新时传入)
titleYes公式显示名称
variablesYes变量列表
expressionYesELN 表达式
writeFormValueYes结果写入字段路径

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description must disclose behavior but fails to. It doesn't mention side effects, prerequisites, how it distinguishes add vs update (e.g., optional id), or any failure conditions. The pointer to the skill doc is useful but not behavioral disclosure.

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 concise (two short sentences) and front-loads the purpose. It includes a useful reference to the syntax skill without unnecessary verbosity. Could be slightly more structured but overall efficient.

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

Completeness2/5

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

The tool has 5 parameters, no output schema, and no annotations. The description lacks crucial context: how to choose between add/update, the role of the optional 'id', and dependencies on template context. It defers syntax details to a skill but leaves behavioral and usage gaps unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds marginal value by pointing to 'Skill: expression-engine.md' for expression syntax and noting 22 built-in functions, which helps with the 'expression' parameter. It does not elaborate on other parameters beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'add or update calculation formula' with a specific verb and resource. However, it does not differentiate from sibling tool 'update_formula', which likely specializes in updates, creating potential confusion about scope overlap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus the sibling 'update_formula' or 'list_formulas'. The description doesn't explain decision criteria (e.g., whether to pass an ID for updates) or any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.