Skip to main content
Glama

PitCanary

Set the night hours of a room

set_night_window
DestructiveIdempotent

Sets when people sleep in a room, as a start and an end time that may cross midnight. A bedroom's or a hotel room's nights are judged on these hours (get_nights), its room score uses its night ranges inside them, and the sensor's light can be switched off during them. Any other room stores them and changes nothing. A room with none set uses 23:00 to 07:00, and use_default set to true clears it back to that. Requires a PitCanary account.

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": {
      "room_id": "<room_id>"
    },
    "name": "set_night_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
nightNoThe night hours. Leave this out when use_default is true.
room_idYesThe room id, as returned by list_rooms.
use_defaultNotrue clears the night hours, so the room uses 23:00 to 07:00 again. Send either this or night.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag a destructive, idempotent, non-open-world write, and the description adds real context beyond them: nights feeding get_nights, the room score consuming night ranges, the sensor light being switchable off during these hours, and the fact that non-bedroom/hotel rooms are inert. It also documents the default window and that use_default clears back to it. It omits error behavior (e.g. start equal to end) and whether changes are retroactive.

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 the core action and free of filler, but the middle sentence packs three effects (nights, score, light) into one long clause chain, which slightly hurts scannability. Nothing is redundant enough to cut outright.

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 no output schema and only three parameters, the definition covers defaults, side effects, room-type behavior, and the account requirement, which is enough to call it correctly. Minor gaps remain around failure modes and whether existing scores are recomputed.

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%, so the baseline is 3, but the description adds meaning the schema does not: the implicit default of 23:00–07:00 when nothing is set, and that use_default restores that default rather than merely unsetting. It also clarifies the midnight-crossing intent of start/end beyond the regex pattern.

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 gives a specific verb and resource ("Sets when people sleep in a room, as a start and an end time") and immediately scopes it with the midnight-crossing case. It is clearly distinguishable from sibling setters such as set_active_hours or set_nap_blocks because it defines the night concept and what consumes it.

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?

It states the effect per room type ("A bedroom's or a hotel room's nights are judged on these hours... Any other room stores them and changes nothing") and names get_nights as the consumer, which tells an agent when the call matters. It stops short of explicitly contrasting with the other time-window setters, so there is no full when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources