my_tool
Extend AI application functionality in Claude Desktop using modular tools without modifying core code. Configure custom parameters to add specific capabilities.
Instructions
自定义工具
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| param | Yes |
Implementation Reference
- modules/my_module/my_module.py:18-21 (handler)The handler implementation for the 'my_tool' tool, decorated with @server.tool() which also handles registration. It takes a string parameter and returns a formatted processing message.@server.tool() def my_tool(param: str) -> str: """自定义工具""" return f"处理参数: {param}"
- modules/my_module/my_module.py:18-18 (registration)The @server.tool() decorator registers the my_tool function in the module's register method.@server.tool()
- modules/my_module/my_module.py:19-19 (schema)The function signature defines the input schema (param: str) and output type (str) for the my_tool.def my_tool(param: str) -> str: