Skip to main content
Glama

Get Mac session

get_mac_session
Read-only

Returns a Mac session: state (queued, provisioning, ready, stopping, stopped or failed), cost, deadlines and cleanup_confirmed; once ready, also the image (macOS, Xcode, Simulator runtimes, tools), the secrets and signing files installed on it by name, and the Mac's account and drive. wait_seconds (up to 40) waits for a starting or stopping Mac to change state. include adds the account's recent sessions, its drive (space, versions, saves) or its secret names. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoAlso return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (~/drive: space, versions, saves), secrets (names only, not values)
session_idNoMac session ID (ses_…). Optional: without it, the account's running Mac.
wait_secondsNoWait up to this long (0-40) for a starting or stopping session to change state, instead of polling.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include / description
      Previous value: -"Also return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (~/drive: space, versions, saves), secrets (names, never values)"New value: +"Also return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (~/drive: space, versions, saves), secrets (names only, not values)"
  2. Changed1 schema field changed
    • addedInput schema / properties / include
      Added value: +{
      +  "description": "Also return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (~/drive: space, versions, saves), secrets (names, never values)",
      +  "items": {
      +    "enum": [
      +      "sessions",
      +      "drive",
      +      "secrets"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 3,
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / session_id / description
      Previous value: -"Mac session ID (ses_…) returned by start_mac or list_mac_sessions."New value: +"Mac session ID (ses_…). Optional: without it, the account's running Mac."
    • removedInput schema / required
      Removed value: -[
      -  "session_id"
      -]
  4. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": {},
      -  "description": "The JSON response of the NoMac API for this operation",
      -  "properties": {
      -    "error": {
      -      "additionalProperties": {},
      -      "description": "Present only when the call failed",
      -      "properties": {
      -        "code": {
      -          "description": "Stable machine-readable error code, for example insufficient_credit",
      -          "type": "string"
      -        },
      -        "message": {
      -          "description": "What went wrong and what to do next",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "code",
      -        "message"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  5. Changed1 schema field changed
    • addedInput schema / properties / wait_seconds
      Added value: +{
      +  "description": "Wait up to this long (0-40) for a starting or stopping session to change state, instead of polling.",
      +  "maximum": 40,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  6. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the bar is lower, yet the description still adds value: it enumerates the state machine values, discloses that the call can block for up to 40 seconds, and notes that installed secrets are returned by name only, not values. It omits error/not-found behavior, which is the main remaining gap.

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?

It is a single dense paragraph that front-loads the return shape before moving to the two behavioral parameters, and nearly every clause carries information. It is longer than a minimal definition and reads as a run-on of semicolon-joined clauses, which costs a point but not much.

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, the description correctly carries the return-value burden and does so thoroughly, including conditional content ('once ready, also the image...'). It stops short of covering failure modes and whether/when the returned image data is absent, which would round out a read tool with three optional parameters.

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%, so all three parameters are already documented in the schema, including the include enum rationale and the session_id default of 'the account's running Mac.' The description largely restates that material (wait window, include contents) rather than adding new syntax or constraints, 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?

It states a precise verb and resource ('Returns a Mac session') and then enumerates the returned payload: state with its full enum, cost, deadlines, cleanup_confirmed, and the ready-state image/secrets/drive. That level of detail distinguishes it from siblings like get_mac_checkout or get_mac_job without opening either schema.

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 gives real usage context: 'wait_seconds (up to 40) waits for a starting or stopping Mac to change state' (i.e. use this instead of polling) and 'include adds the account's recent sessions... to find a Mac after a lost answer.' It does not, however, name an alternative tool or state when a sibling such as get_mac_checkout is the better choice.

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