Skip to main content
Glama

spawn_init

Provision the project directory for a Spawn world: detect the engine version, then clone the git repository or scaffold a pre-6.0 project.

Instructions

Provision the project directory for this world — what that means depends on the engine, and this detects it. On engine 6.0+ (the git lane) the world's code IS a git repository: this CLONES it into projectDir (the agent token is the git password, supplied per-command and never written to .git/config), fetches the spawn notes ref, keeps .env and .spawn/ out of the tree via .git/info/exclude, and saves the docs. A non-empty directory that is not already this world's clone is refused rather than cloned over. On a pre-6.0 world (the document lane) it scaffolds as before: gitignore secrets, world/ + scripts/, pull current spec → game.json, materialize scripts. Either way the docs land in .spawn/ (guide.md, tome-api.md, skills.json).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoEngine 6.0+ only: how many commits of history to clone (default 20). A live world's full history is tens of thousands of objects and may not finish fetching at all, and nothing here needs it — editing, committing and pushing all work from the tip. Pass 0 for the full history (slow, and the only way to get `git log --notes=spawn`).
projectDirNoAbsolute path to the Spawn game project (game.json / .env). Defaults to SPAWN_PROJECT_DIR or the MCP process cwd.
engineVersionNoOptional engine version this call assumes: a semver ('6.0.0', '5.4') or an era name ('6.0' for a git world, 'document' for a pre-6.0 one). Omit it and the world's engine is detected from the API and cached. When passed it is CHECKED against the real pin and a mismatch fails the call without writing anything — it is an assertion, not an override.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / depth
      Added value: +{
      +  "description": "Engine 6.0+ only: how many commits of history to clone (default 20). A live world's full history is tens of thousands of objects and may not finish fetching at all, and nothing here needs it — editing, committing and pushing all work from the tip. Pass 0 for the full history (slow, and the only way to get `git log --notes=spawn`).",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / engineVersion
      Added value: +{
      +  "description": "Optional engine version this call assumes: a semver ('6.0.0', '5.4') or an era name ('6.0' for a git world, 'document' for a pre-6.0 one). Omit it and the world's engine is detected from the API and cached. When passed it is CHECKED against the real pin and a mismatch fails the call without writing anything — it is an assertion, not an override.",
      +  "type": "string"
      +}
  2. First observedv1.2.0

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the agent token being used per-command and never persisted to .git/config, .env/.spawn exclusion, shallow vs full history behavior, and the safety refusal of a non-empty non-matching directory. It also states the side effects concretely (what files land in .spawn/).

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?

Purpose and engine-branching are front-loaded, and the dense single block is mostly informative rather than padding. A few clauses, such as 'scaffolds as before', are vague filler, but nothing is repetitive enough to obscure the main point.

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 no-annotation, no-output-schema tool this covers the important ground: both execution paths, side effects, exclusion rules, auth handling and the failure mode on a version mismatch. It never states what the call returns on success beyond the docs it writes, which leaves a small gap for an agent deciding what to do next.

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% and the schema already explains depth, projectDir and the engineVersion assertion in detail, so the description adds little parameter-level meaning beyond the alias 'projectDir (the clone target)'. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Provision the project directory') and goes further than most by describing the two engine-dependent modes (git-lane clone vs document-lane scaffold). It does not explicitly differentiate itself from plausible siblings such as spawn_create_game or spawn_bootstrap, so an agent still has to infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied rather than stated: the reader infers this is a first-step setup call, and the engine-version branch tells them which path will run. There is no explicit when-to-use or when-not-to-use guidance and no alternative tool is named, even though several siblings (spawn_create_game, spawn_bootstrap) could be confused with it.

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