Cactus Engineering Blog·· 26 天前评分19
如何为 Needle 3 设计工具:把约束写进 schema 与语法
How to Design Tools for Needle 3Needle reads a schema literally and copies every argument from the request, so the toolset is the product. The rules we learned shipping Needle 3: one tool per action, names users would say, formats in descriptions, constraints in the grammar, triggers for the phrasings a description cannot list.Satyajit Kumar · September 18, 2026 · 10 min read
导读
Cactus 分享为 Needle 3 设计工具集的规则:每个动作一个工具,参数必须从请求原文中复制,无对应文本的必填参数会直接扣留调用。工具名和枚举值应使用用户会说的词,取值范围、枚举、长度等约束编译进解码语法,使非法值无法生成。描述无法穷举的说法可用触发器正则匹配,将解码限定到对应工具并强制产生调用。
来源:Cactus Engineering Blog · cactuscompute.com