Skip to main content
Glama
switch-parental-controls

switch-parental-controls

switch_set_timer_mode

Idempotent

Set the playtime limit mode for a device: DAILY for one shared daily limit or EACH_DAY_OF_THE_WEEK for separate per-day limits before configuring restrictions.

Instructions

Choose between one limit for every day (DAILY) and one per weekday (EACH_DAY_OF_THE_WEEK).

Use it before switch_set_day_restrictions, which only takes effect in EACH_DAY_OF_THE_WEEK mode; in DAILY mode switch_set_daily_playtime_limit sets the limit. switch_get_device shows the current mode. Returns a confirmation.

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>",
      "mode": "<mode>"
    },
    "name": "switch_set_timer_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesTimer mode: 'DAILY' for a single limit for all days, or 'EACH_DAY_OF_THE_WEEK' for per-day limits.
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. Changed5 schema fields changedv1.4.1
    • removedInput schema / $defs
      Removed value: -{
      -  "SetTimerModeInput": {
      -    "additionalProperties": false,
      -    "description": "Input model for setting the timer mode.",
      -    "properties": {
      -      "device_id": {
      -        "description": "The unique device ID. Use switch_list_devices to find it.",
      -        "title": "Device Id",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "description": "Timer mode: 'DAILY' for a single limit for all days, or 'EACH_DAY_OF_THE_WEEK' for per-day limits.",
      -        "pattern": "^(DAILY|EACH_DAY_OF_THE_WEEK)$",
      -        "title": "Mode",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "device_id",
      -      "mode"
      -    ],
      -    "title": "SetTimerModeInput",
      -    "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 / mode
      Added value: +{
      +  "description": "Timer mode: 'DAILY' for a single limit for all days, or 'EACH_DAY_OF_THE_WEEK' for per-day limits.",
      +  "pattern": "^(DAILY|EACH_DAY_OF_THE_WEEK)$",
      +  "title": "Mode",
      +  "type": "string"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "$ref": "#/$defs/SetTimerModeInput"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "device_id",
      +  "mode"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=true, so the safety profile is covered; the description adds real value with mutation semantics (the mode gates which sibling tool takes effect), a confirmation return, and verbatim failure strings for unknown device and missing/expired auth along with the remediation (switch_get_login_url). The notable gap is that it never says what happens to already-configured per-day restrictions when switching to DAILY, which is the main behavioral risk for this idempotent mode switch.

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?

Front-loaded with the mode choice, then dependency ordering, then failure modes in a clearly delimited second block. Every sentence carries information an agent would otherwise have to guess, including the exact error prefixes.

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

Completeness4/5

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

With an output schema present it correctly does not spend words on return values, and it covers prerequisites, alternatives, state inspection, and error handling for a two-parameter mutation. The one omission relative to its complexity is the effect on existing per-day limits when the mode changes, which materially affects the decision to call it.

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

Parameters4/5

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

Schema coverage is 100% and the mode parameter already carries a pattern and description, so the baseline is 3. The description earns one step above baseline by explaining the consequence of each mode (which sibling tool governs the limit under each), which is functional meaning not encoded in the schema.

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

Purpose4/5

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

The description states a concrete resource and the two configurable values (DAILY one limit for all days vs EACH_DAY_OF_THE_WEEK per-weekday limits), which is enough to distinguish it from the sibling 'limit' setters. It never uses an explicit verb like 'set' for the mode itself, so the 'this writes device configuration' framing is implied by the mode semantics rather than stated.

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?

It gives explicit sequencing ('Use it before switch_set_day_restrictions'), states the conditional dependency (day restrictions only take effect in EACH_DAY_OF_THE_WEEK mode), and names the alternative path in DAILY mode (switch_set_daily_playtime_limit). It also points to switch_get_device for the current mode, so an agent knows both when to call it and how to check state first.

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