Skip to main content
Glama

Get Mac session

get_mac_session
Read-onlyIdempotent

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_mac_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
includeNoAlso return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (its drives: 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 only, not values)"New value: +"Also return the account's: sessions (its 20 newest, to find a Mac after a lost answer), drive (its drives: space, versions, saves), secrets (names only, not values)"
  2. 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)"
  3. 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"
      +}
  4. 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"
      -]
  5. 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
  6. 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"
      +}
  7. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety bar is met; the description adds real behavior — the full state enumeration, that a ready Mac exposes image/secrets/account/drive, and that wait_seconds blocks on transitions. The trailing 'Read-only.' merely restates the annotation, so it earns nothing.

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 returned payload and compressed into one dense paragraph with no filler. Slightly overloaded — it mixes return contents, wait semantics, and include options in a single block — but each clause carries information.

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?

There is no output schema and no required parameters, so the description bears the full load of explaining return values, and it does so field by field (state values, cost, deadlines, image contents, secret names, drive). An agent can form a correct call and interpret the response from this text alone.

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 the baseline is 3. The description adds little beyond the schema: it restates the wait behavior ('waits for a starting or stopping Mac to change state') and the include options without new syntax, defaults, or edge-case meaning.

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?

Names a specific verb+resource (returns a Mac session) and immediately enumerates what is returned: state lifecycle values (queued, provisioning, ready, stopping, stopped, failed), cost, deadlines, cleanup_confirmed, plus image/secrets/drive once ready. That scope is distinct from sibling tools like start_mac, stop_mac, or get_mac_job.

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?

Gives actionable guidance: wait_seconds (up to 40) avoids polling for a state change, and include fetches the account's recent sessions, drive, or secret names. It does not explicitly route the agent away from alternatives such as get_mac_job or stop_mac, so the when-not guidance is implicit rather than stated.

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