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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"expression": "<expression>",
"writeFormValue": "<writeFormValue>",
"variables": "<variables>"
},
"name": "add_formula"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | 已有公式 ID(更新时传入) | |
| title | Yes | 公式显示名称 | |
| variables | Yes | 变量列表 | |
| expression | Yes | ELN 表达式 | |
| writeFormValue | Yes | 结果写入字段路径 |