Skip to main content
Glama

macro_start_session

Destructive

Register a coding agent for a project, optionally reserve file paths, and return session metadata plus an inbox snapshot to coordinate concurrent work.

Instructions

Ensure the project, register an agent, optionally reserve paths, and return {project, agent, file_reservations, inbox}. The inbox contains the latest metadata without marking mail read; use fetch_inbox for bodies and unread-mail draining. Reuse the hook's name as agent_name or its session tag in task_description to avoid a second identity. Conflicting paths appear under file_reservations.conflicts; other paths are granted. If already registered and only checking mail, use fetch_inbox instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel id the session runs.
programYesAgent host, such as claude-code, codex or cursor.
worktreeNoAbsolute path of the checkout being edited, in this project. Omit to keep its recorded location.
human_keyYesAbsolute path of the repository's primary checkout.
agent_nameNoYour existing name. Omit to get one generated.
inbox_limitNoPositive page size; default 10, capped at 1000.
task_descriptionNoWhat you are working on. Keep the leading [host:session ...] tag the register hook gave you.
file_reservation_pathsNoRepository-relative paths or globs to reserve.
file_reservation_reasonNoShown to agents whose reservation conflicts.
file_reservation_ttl_secondsNoSeconds, default 3600, at most 2592000 (30 days).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.4
    • addedInput schema / properties / worktree
      Added value: +{
      +  "description": "Absolute path of the checkout being edited, in this project. Omit to keep its recorded location.",
      +  "type": "string"
      +}
  2. Changed6 schema fields changedv0.2.2
    • addedInput schema / properties / agent_name / description
      Added value: +"Your existing name. Omit to get one generated."
    • addedInput schema / properties / file_reservation_paths / description
      Added value: +"Repository-relative paths or globs to reserve."
    • addedInput schema / properties / file_reservation_reason / description
      Added value: +"Shown to agents whose reservation conflicts."
    • addedInput schema / properties / model / description
      Added value: +"Model id the session runs."
    • addedInput schema / properties / program / description
      Added value: +"Agent host, such as claude-code, codex or cursor."
    • addedInput schema / properties / task_description / description
      Added value: +"What you are working on. Keep the leading [host:session ...] tag the register hook gave you."
  3. First observedv0.2.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotency, and the description adds real behavioral context beyond them: the inbox does not mark mail read, conflicting paths surface under file_reservations.conflicts while other paths are granted. It does not explain the destructive/non-idempotent implications (e.g. what a re-run destroys), leaving a small 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?

Front-loaded with the action list and return shape, then the mail/conflict caveats, then the alternative. Dense but each sentence carries information; no wasted preamble.

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?

For a 10-parameter macro with no output schema, the description compensates by enumerating the returned keys and clarifying conflict behavior, which is exactly what is missing structurally. It is nearly complete, though it could say more about the destructive/non-idempotent re-invocation semantics.

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 genuine meaning beyond the schema by telling the agent to reuse the hook's agent_name or paste its session tag into task_description to avoid a duplicate identity. Other parameters are left to 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?

States a specific compound action (ensure project, register agent, optionally reserve paths, return {project, agent, file_reservations, inbox}) with a clear verb+resource framing. It explicitly distinguishes itself from the sibling fetch_inbox, so an agent can tell them apart 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (fetch_inbox) and the exact conditions that select it: for message bodies, for unread-mail draining, and 'If already registered and only checking mail.' It also gives the positive routing hint about reusing the hook's name or session tag to avoid a second identity.

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