Unverified90% confidenceFactExact time
Python的@tool装饰器通过setattr在函数对象上挂载__tool_definition__属性,使函数在运行时携带自描述信息
1
Sources
90%
Confidence
Long-term
Relevance
5/21/2026
First Seen
Sources
从零构建Agent框架:四大核心模块拆解与代码实现
bilibili氪金氪氪氪氪5/21/2026
Related Entities
Related Claims
Unverified可通过给@tool装饰器传入参数(如@tool("calculator", description="..."))自定义工具名称或描述77% similarUnverifiedFunction Calling(Tool Use)是大模型调用外部工具的标准化机制,开发者预先声明工具名称、描述和参数Schema,模型自主判断何时调用70% similarUnverifiedThe 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% similarUnverifiedTool通常包含名称、描述、输入参数Schema和执行函数四个核心要素67% similarUnverified工具Schema包含功能说明、参数名称、类型、含义解释以及required标记参数是否必填66% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1617API
curl https://kongchang.com/api/v1/knowledge/claims/1617MCP
get_claim(id=1617)