Tools API
Tools API は、Mastra プラットフォームで利用可能な Tool を操作・実行するためのメソッドを提供します。
すべての Tool の取得すべての Tool の取得への直接リンク
利用可能なすべての Tool の一覧を取得します。
const tools = await mastraClient.listTools()
特定の Tool の操作特定の Tool の操作への直接リンク
特定の Tool のインスタンスを取得します。
const tool = mastraClient.getTool('tool-id')
Tool のメソッドTool のメソッドへの直接リンク
Tool の詳細を取得Tool の詳細を取得への直接リンク
Tool の詳細情報を取得します。
const details = await tool.details()
Tool を実行Tool を実行への直接リンク
指定した引数で Tool を実行します。
const result = await tool.execute({
args: {
param1: 'value1',
param2: 'value2',
},
threadId: 'thread-1', // Optional: Thread context
resourceId: 'resource-1', // Optional: Resource identifier
})