> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ja/llms.txt # Mastra.getTool() `.getTool()` メソッドは、Mastra レベルのレジストリから登録キーで Tool を取得します。 ## 使用例 `weather` キーで Tool を登録し、そのキーを使って取得します。 ```typescript import { Mastra } from '@mastra/core/mastra' import { weatherTool } from './tools/weather-tool' export const mastra = new Mastra({ tools: { weather: weatherTool, }, }) const tool = mastra.getTool('weather') ``` ## パラメーター **name** (`TToolName extends keyof TTools`): Mastra の tools レジストリにある Tool の登録キー。 ## 関連項目 - [Agent 間で Tool を共有](https://mastra.zisheng.pro/ja/docs/agents/using-tools) - [Mastra クラス](https://mastra.zisheng.pro/ja/reference/core/mastra-class) - [Mastra.getToolById()](https://mastra.zisheng.pro/ja/reference/core/getToolById) - [Mastra.listTools()](https://mastra.zisheng.pro/ja/reference/core/listTools)