Skip to main content
Glama
switch-parental-controls

switch-parental-controls

switch_set_bedtime_end_time

Idempotent

Sets the daily morning time when bedtime ends so a device can be used again; use hour=0 and minute=0 to disable the limit.

Instructions

Set the time in the morning from which a device can be used again, for every day.

Use it for the end of bedtime (05:00 to 09:00), or hour=0 and minute=0 to turn it off. The evening alarm is set with switch_set_bedtime_alarm, a bedtime for single weekdays with switch_set_day_restrictions. Returns a confirmation.

Times outside 05:00 to 09:00 are rejected with the reason. Returns "Error: Device '' not found. ..." for an unknown device_id. Returns "Error: Not authenticated. ..." without a session token and "Error: Authentication failed. ..." when it expired; then log in again with switch_get_login_url.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "device_id": "<device_id>",
      "hour": "<hour>"
    },
    "name": "switch_set_bedtime_end_time"
  }
}

Input Schema

NameRequiredDescriptionDefault
hourYesHour when bedtime ends and the device can be used again (5-9). Use 0 with minute=0 to disable.
minuteNoMinute when bedtime ends (0-59).
device_idYesThe unique device ID. Use switch_list_devices to find it.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.4.1
    • removedInput schema / $defs
      Removed value: -{
      -  "SetBedtimeEndInput": {
      -    "additionalProperties": false,
      -    "description": "Input model for setting the bedtime end time.",
      -    "properties": {
      -      "device_id": {
      -        "description": "The unique device ID. Use switch_list_devices to find it.",
      -        "title": "Device Id",
      -        "type": "string"
      -      },
      -      "hour": {
      -        "description": "Hour when bedtime ends and the device can be used again (5-9). Use 0 with minute=0 to disable.",
      -        "maximum": 9,
      -        "minimum": 0,
      -        "title": "Hour",
      -        "type": "integer"
      -      },
      -      "minute": {
      -        "default": 0,
      -        "description": "Minute when bedtime ends (0-59).",
      -        "maximum": 59,
      -        "minimum": 0,
      -        "title": "Minute",
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "device_id",
      -      "hour"
      -    ],
      -    "title": "SetBedtimeEndInput",
      -    "type": "object"
      -  }
      -}
    • addedInput schema / properties / device_id
      Added value: +{
      +  "description": "The unique device ID. Use switch_list_devices to find it.",
      +  "title": "Device Id",
      +  "type": "string"
      +}
    • addedInput schema / properties / hour
      Added value: +{
      +  "description": "Hour when bedtime ends and the device can be used again (5-9). Use 0 with minute=0 to disable.",
      +  "maximum": 9,
      +  "minimum": 0,
      +  "title": "Hour",
      +  "type": "integer"
      +}
    • addedInput schema / properties / minute
      Added value: +{
      +  "default": 0,
      +  "description": "Minute when bedtime ends (0-59).",
      +  "maximum": 59,
      +  "minimum": 0,
      +  "title": "Minute",
      +  "type": "integer"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "$ref": "#/$defs/SetBedtimeEndInput"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "device_id",
      +  "hour"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare the mutation profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), and the description adds behavior beyond them: the accepted value range, that out-of-range values are rejected with a reason, and three distinct error returns (unknown device_id, not authenticated, session expired) with remediation via switch_get_login_url. It also notes that it applies to every day, which the annotations cannot express.

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

Conciseness4/5

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

The core behavior is front-loaded in the first sentence and the rest is scannable error-contract text rather than prose padding. It loses a point for duplication: the 05:00-09:00 window is stated twice (once as the use case, once as the rejection rule), and 'Returns a confirmation' is redundant with the output schema.

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

Completeness5/5

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

For a three-parameter mutation with full schema coverage, annotations and an output schema, the description supplies everything an agent still needs: valid range, disable semantics, per-day scope, rejection behavior and the auth-error recovery path. Nothing required to call it correctly or handle failures is missing.

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?

Schema description coverage is 100%, and the schema already documents hour (5-9, 0 to disable), minute (0-59) and device_id with a pointer to switch_list_devices. The description's '05:00 to 09:00' range and 'hour=0 and minute=0 to turn it off' largely restate what the schema phrases already say, so a baseline 3 is appropriate.

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

Purpose5/5

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

States a specific verb and resource ('Set the time in the morning from which a device can be used again, for every day') and immediately distinguishes it from the two nearest siblings by naming switch_set_bedtime_alarm for the evening alarm and switch_set_day_restrictions for per-weekday bedtimes. An agent can identify exactly which bedtime field this mutates without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit use conditions (bedtime end, 05:00 to 09:00), an explicit disable path (hour=0 and minute=0), and routes the adjacent use cases to switch_set_bedtime_alarm and switch_set_day_restrictions. The out-of-range rejection rule plus the login recovery path via switch_get_login_url cover the remaining decision points.

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