Skip to main content
Glama
switch-parental-controls

switch-parental-controls

switch_set_restriction_mode

Idempotent

Set whether a Nintendo Switch device suspends the game or only shows an alarm when its daily or per-day playtime limit is reached.

Instructions

Choose what happens when the playtime limit is reached: suspend the game or only show an alarm.

FORCED_TERMINATION suspends the software at the limit, ALARM only shows a notice on the screen. This applies to the daily and the per-day limits. 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_restriction_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesRestriction mode: 'FORCED_TERMINATION' to suspend software when playtime limit is reached, or 'ALARM' to only show an alarm without suspending.
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: -{
      -  "SetRestrictionModeInput": {
      -    "additionalProperties": false,
      -    "description": "Input model for setting the restriction mode.",
      -    "properties": {
      -      "device_id": {
      -        "description": "The unique device ID. Use switch_list_devices to find it.",
      -        "title": "Device Id",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "description": "Restriction mode: 'FORCED_TERMINATION' to suspend software when playtime limit is reached, or 'ALARM' to only show an alarm without suspending.",
      -        "pattern": "^(FORCED_TERMINATION|ALARM)$",
      -        "title": "Mode",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "device_id",
      -      "mode"
      -    ],
      -    "title": "SetRestrictionModeInput",
      -    "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": "Restriction mode: 'FORCED_TERMINATION' to suspend software when playtime limit is reached, or 'ALARM' to only show an alarm without suspending.",
      +  "pattern": "^(FORCED_TERMINATION|ALARM)$",
      +  "title": "Mode",
      +  "type": "string"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "$ref": "#/$defs/SetRestrictionModeInput"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "device_id",
      +  "mode"
      +]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (idempotent, non-destructive, open-world), the description discloses the blast radius ('applies to the daily and the per-day limits'), the return shape ('Returns a confirmation'), and the exact error strings for unknown device and missing/expired auth, including the remediation step via switch_get_login_url. That is genuinely operational context an agent cannot get from the structured fields.

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, with consequences and error handling following logically. There is minor redundancy (mode semantics are explained twice, once in prose and once against the daily/per-day limits) and a stray line break/quote artifact, but nothing is wasted at length.

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 two-parameter, idempotent setter with an output schema, the description covers purpose, scope of effect, confirmation behavior, and failure modes with remediation. An agent has everything needed to invoke it correctly and recover from errors.

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%; the schema already documents device_id and spells out both enum values in detail. The description's mode explanation largely restates the schema and adds no format, default, or constraint information beyond it, so the baseline 3 applies.

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?

The description states a specific verb and resource ('Choose what happens when the playtime limit is reached') and immediately names the two concrete outcomes, FORCED_TERMINATION vs ALARM, so the agent knows exactly what state this tool changes. It also points at switch_get_device for reading the current mode, which separates the write from the read sibling.

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

Usage Guidelines4/5

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

Usage context is clear: call this to change the enforcement behavior, and call switch_get_device to inspect the current mode. It does not give explicit when-not guidance (e.g., whether this is per-device or per-player, or when to prefer switch_set_day_restrictions), so it stops short of a 5.

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