> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-HK/llms.txt # Tools API Tools API 提供與 Mastra 平台可用 Tool 互動及執行 Tool 的方法。 ## 取得所有 Tool 取得所有可用 Tool 的清單: ```typescript const tools = await mastraClient.listTools() ``` ## 使用指定 Tool 取得指定 Tool 的實例: ```typescript const tool = mastraClient.getTool('tool-id') ``` ## Tool 方法 ### 取得 Tool 詳情 取得 Tool 的詳細資料: ```typescript const details = await tool.details() ``` ### 執行 Tool 以指定參數執行 Tool: ```typescript const result = await tool.execute({ args: { param1: 'value1', param2: 'value2', }, threadId: 'thread-1', // Optional: Thread context resourceId: 'resource-1', // Optional: Resource identifier }) ```