Skip to main content
Glama

Prevent or allow sleep

hs_keep_awake

Stop your Mac from sleeping for long builds or downloads. You can also let it sleep again or check whether it is currently awake.

Instructions

Stop the Mac from sleeping, or let it sleep again. Called with no arguments it reports the current state. Useful before a long build or download.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
awakeNoTrue to prevent sleep, false to allow it. Omit to only report the state.
Behavior4/5

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

With no annotations provided, the description carries full burden and delivers: it discloses the three behavioral modes (prevent sleep, allow sleep, report state without args). It goes beyond the schema by confirming the side-effect-free no-argument read-back behavior. Could add permission requirements or timeout semantics, but for a simple toggle this is thorough.

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?

Two sentences, front-loaded with the core action, and every word adds value. The use-case sentence earns its place by guiding invocation timing, with zero fluff or redundancy.

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 tool with one optional boolean parameter, no output schema, no enums, and no nested objects, the description fully covers the behavioral surface area. It explains the action, the state-reporting invocation, and when it's useful—nothing missing for an agent to use it 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 description coverage is 100%—the single boolean 'awake' parameter is fully documented in the schema ('True to prevent sleep, false to allow it'), so the baseline of 3 applies. The description's mention of the no-arg behavior is a nice confirmation but doesn't add novel parameter syntax beyond the schema.

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?

Clear verb+resource+scope: 'Stop the Mac from sleeping, or let it sleep again' precisely describes the action on the resource. It distinguishes the no-argument behavior ('reports the current state') and doesn't overlap with any sibling like hs_machine_status or hs_lock_screen.

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?

Provides a concrete use-case ('Useful before a long build or download') that signals when an agent should call this tool. It implicitly covers the state-reporting usage pattern, though it doesn't name specific alternatives—though no sibling tool directly overlaps, so no exclusion is strictly needed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vukvukovich/hammerspoon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server