Skip to main content
Glama
switch-parental-controls

switch-parental-controls

switch_get_playtime

Read-onlyIdempotent

Retrieve daily Nintendo Switch playtime for a device or player by month or specific day. Check how long was played on selected dates, including disabled and exceeded time.

Instructions

Get the playtime per day of a month, or of a single day, for a device or one player.

Use it for questions about specific days ("how long on Saturday", "each day this month"). Without year and month it covers the current month, from live data that also shows disabled and exceeded time per day; past months come from the monthly summary. With day it returns that day only, with player_id only that player. For today only use switch_get_today_summary, for the totals of a month switch_get_monthly_summary.

Returns "No daily data available for on device ''." or "No data available for ..." when there is nothing for the period, and "Error: Player '' not found ..." for an unknown player_id. 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>"
    },
    "name": "switch_get_playtime"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayNoFilter results to a specific day (1-31). Requires year and month to be set.
yearNoYear for the breakdown (e.g. 2024). If omitted, returns the current month's live data.
monthNoMonth for the breakdown (1-12). Required if year is provided; must be omitted if year is omitted.
device_idYesThe unique device ID. Use switch_list_devices to find it.
player_idNoFilter results to a specific player ID. Use switch_list_players to find player IDs.
skip_cacheNoSkip reading from and writing to the local cache. Always fetches fresh data from the Nintendo API. Useful when data looks stale or unexpected.
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readable.markdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.4.1
    • removedInput schema / $defs / PlaytimeInput
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "Input model for playtime queries, extending monthly summary with a day filter.",
      -  "properties": {
      -    "day": {
      -      "anyOf": [
      -        {
      -          "maximum": 31,
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter results to a specific day (1-31). Requires year and month to be set.",
      -      "title": "Day"
      -    },
      -    "device_id": {
      -      "description": "The unique device ID. Use switch_list_devices to find it.",
      -      "title": "Device Id",
      -      "type": "string"
      -    },
      -    "month": {
      -      "anyOf": [
      -        {
      -          "maximum": 12,
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Month for the breakdown (1-12). Required if year is provided; must be omitted if year is omitted.",
      -      "title": "Month"
      -    },
      -    "player_id": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter results to a specific player ID. Use switch_list_players to find player IDs.",
      -      "title": "Player Id"
      -    },
      -    "response_format": {
      -      "$ref": "#/$defs/ResponseFormat",
      -      "default": "markdown",
      -      "description": "Output format: 'markdown' for human-readable or 'json' for machine-readable."
      -    },
      -    "skip_cache": {
      -      "default": false,
      -      "description": "Skip reading from and writing to the local cache. Always fetches fresh data from the Nintendo API. Useful when data looks stale or unexpected.",
      -      "title": "Skip Cache",
      -      "type": "boolean"
      -    },
      -    "year": {
      -      "anyOf": [
      -        {
      -          "maximum": 2100,
      -          "minimum": 2017,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Year for the breakdown (e.g. 2024). If omitted, returns the current month's live data.",
      -      "title": "Year"
      -    }
      -  },
      -  "required": [
      -    "device_id"
      -  ],
      -  "title": "PlaytimeInput",
      -  "type": "object"
      -}
    • addedInput schema / properties / day
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 31,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter results to a specific day (1-31). Requires year and month to be set.",
      +  "title": "Day"
      +}
    • 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 / month
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 12,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Month for the breakdown (1-12). Required if year is provided; must be omitted if year is omitted.",
      +  "title": "Month"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "$ref": "#/$defs/PlaytimeInput"
      -}
    • addedInput schema / properties / player_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter results to a specific player ID. Use switch_list_players to find player IDs.",
      +  "title": "Player Id"
      +}
    • addedInput schema / properties / response_format
      Added value: +{
      +  "$ref": "#/$defs/ResponseFormat",
      +  "default": "markdown",
      +  "description": "Output format: 'markdown' for human-readable or 'json' for machine-readable."
      +}
    • addedInput schema / properties / skip_cache
      Added value: +{
      +  "default": false,
      +  "description": "Skip reading from and writing to the local cache. Always fetches fresh data from the Nintendo API. Useful when data looks stale or unexpected.",
      +  "title": "Skip Cache",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / year
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 2100,
      +      "minimum": 2017,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Year for the breakdown (e.g. 2024). If omitted, returns the current month's live data.",
      +  "title": "Year"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "device_id"
      +]
  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?

Beyond the readOnly/idempotent annotations, it discloses the data provenance difference — current month from live data (including disabled and exceeded time) versus past months from the monthly summary — which materially affects result interpretation. It also enumerates the failure modes: empty-period messages, unknown player_id, unknown device_id, missing session token, and expired auth with the recovery path (switch_get_login_url).

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?

Front-loaded with purpose and usage, then scope modifiers, then alternatives, then error strings — a sensible ordering. The error-message enumeration is longer than strictly necessary and could be compressed, but each line maps to a distinct recoverable failure, so little is pure waste.

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?

Output schema exists, so return-shape explanation is not required; the description instead covers the things structured fields cannot — data source differences, empty-result behavior, auth failure recovery, and sibling routing. For a read-only reporting tool with 7 params this is fully sufficient to invoke correctly.

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 coverage is 100%, so all seven parameters are already documented, and the description largely restates them (day restricts to one day, player_id restricts to one player, omitted year/month means current month). It does add the interaction rule that day narrows the result set rather than replacing the month view, but it adds no new format or constraint detail beyond the schema — a baseline 3.

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 ("Get the playtime per day of a month, or of a single day") plus the scoping axes (device or single player). It explicitly contrasts itself with switch_get_today_summary and switch_get_monthly_summary, so an agent can distinguish it from siblings 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 concrete usage triggers ("how long on Saturday", "each day this month") and names the two alternative tools with the conditions that select them (today-only, monthly totals). It also states the exclusions implicitly via those alternatives, which is exactly the routing guidance an agent needs.

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