> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-TW/llms.txt # Tools API Tools API 提供用於與 Mastra 平台中可用的 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 }) ```