Skip to main content
Glama
genm
by genm

get_device_status

Retrieve the current status of a SwitchBot device to monitor its operational state and connectivity.

Instructions

デバイスのステータスを取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdYesデバイスID

Implementation Reference

  • The handler function for the 'get_device_status' tool. It validates the deviceId parameter, makes an API call to SwitchBot's /devices/{deviceId}/status endpoint using the configured axios instance, and returns the response body as JSON text.
    case 'get_device_status': {
        const args = request.params.arguments;
        if (!args || typeof args.deviceId !== 'string') {
            throw new McpError(
                ErrorCode.InvalidParams,
                'デバイスIDが必要です'
            );
        }
    
        const response = await this.axiosInstance.get(
            `/devices/${args.deviceId}/status`
        );
    
        return {
            content: [
                {
                    type: 'text',
                    text: JSON.stringify(response.data.body, null, 2),
                },
            ],
        };
    }
  • src/index.ts:96-110 (registration)
    Registration of the 'get_device_status' tool in the ListToolsRequestSchema handler's tools array, specifying name, description, and input schema.
    {
        name: 'get_device_status',
        description: 'デバイスのステータスを取得します',
        inputSchema: {
            type: 'object',
            properties: {
                deviceId: {
                    type: 'string',
                    description: 'デバイスID',
                },
            },
            required: ['deviceId'],
        },
    },
    {
  • Input schema definition for the 'get_device_status' tool, requiring a 'deviceId' string.
    inputSchema: {
        type: 'object',
        properties: {
            deviceId: {
                type: 'string',
                description: 'デバイスID',
            },
        },
        required: ['deviceId'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does ('get device status') without mentioning any behavioral traits such as whether it's read-only, requires authentication, has rate limits, returns specific data formats, or handles errors. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with zero waste, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the status includes (e.g., online/offline, metrics), how results are returned, or any error conditions. For a tool with no structured behavioral or output information, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'deviceId' documented as 'デバイスID' (device ID). The description adds no additional meaning beyond what the schema provides, such as explaining what constitutes a valid device ID or how to obtain it. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose ('デバイスのステータスを取得します' translates to 'Get device status'), which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'list_devices' (which might list multiple devices) or 'control_device' (which performs actions rather than retrieving status). The purpose is understandable but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are no explicit instructions about when to use 'get_device_status' instead of 'list_devices' or 'control_device', nor any context about prerequisites or exclusions. This leaves the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/genm/switchbot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server