list_devices
Retrieve a list of SwitchBot devices for management and control through the SwitchBot MCP Server.
Instructions
デバイス一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:135-145 (handler)The switch case handler for the 'list_devices' tool. It makes a GET request to the SwitchBot API endpoint '/devices' and returns the device list as JSON text content.case 'list_devices': { const response = await this.axiosInstance.get('/devices'); return { content: [ { type: 'text', text: JSON.stringify(response.data.body.deviceList, null, 2), }, ], }; }
- src/index.ts:87-95 (registration)Registration of the 'list_devices' tool in the ListTools response, including name, description, and empty input schema.{ name: 'list_devices', description: 'デバイス一覧を取得します', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:90-94 (schema)Input schema for the 'list_devices' tool: an empty object with no required properties.inputSchema: { type: 'object', properties: {}, required: [], },