待验证90% 置信事实精确时间
Python的@tool装饰器通过setattr在函数对象上挂载__tool_definition__属性,使函数在运行时携带自描述信息
1
来源数
90%
置信度
长期有效
时效性
2026/5/21
首次发现
来源
从零构建Agent框架:四大核心模块拆解与代码实现
bilibili氪金氪氪氪氪2026/5/21
涉及实体
相关事实
待验证可通过给@tool装饰器传入参数(如@tool("calculator", description="..."))自定义工具名称或描述77% 相似待验证Function Calling(Tool Use)是大模型调用外部工具的标准化机制,开发者预先声明工具名称、描述和参数Schema,模型自主判断何时调用70% 相似待验证The Tool Registry stores tools in a dictionary where the key is the tool name and the value is a ToolDefinition containing name, description, parameter list, and handler function.69% 相似待验证Tool通常包含名称、描述、输入参数Schema和执行函数四个核心要素67% 相似待验证工具Schema包含功能说明、参数名称、类型、含义解释以及required标记参数是否必填66% 相似
引用此条事实
Stable URI
https://kongchang.com/claim/1617API
curl https://kongchang.com/api/v1/knowledge/claims/1617MCP
get_claim(id=1617)