Skip to main content
Glama

harness_init

DestructiveIdempotent

Create a missing harness manifest from a template and inject a loom-managed block into a target file if needed. Re-runnable and skip-exists by default.

Instructions

Scaffold a harness manifest at /harnesses/.md from the template (see stack spec v1 §4.7). Call this when identity() reports a missing manifest for the current harness. Idempotent: skip-exists by default; overwrite: true replaces.

When target is supplied, also writes a loom-managed block (bounded by markers with an embedded line) into that file — typically the project CLAUDE.md. Re-runnable: the block is left unchanged when already present and intact ("no-change"), reinstalled when missing or corrupted ("created" / "updated"). Pass an absolute path or a path relative to the current working directory.

Input Schema

NameRequiredDescriptionDefault
nameYesHarness name (e.g. "claude-code", "codex", "gemini-cli")
targetNoPath to the dotfile to inject the managed loom block into (e.g. an absolute path to CLAUDE.md / AGENTS.md / GEMINI.md). When omitted only the harness manifest is scaffolded.
overwriteNoReplace existing manifest (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "Path to the dotfile to inject the managed loom block into (e.g. an absolute path to CLAUDE.md / AGENTS.md / GEMINI.md). When omitted only the harness manifest is scaffolded.",
      +  "type": "string"
      +}
  3. First observedv0.4.1

TDQS

A4.6/5.0
Behavior5/5

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

Although annotations already declare idempotentHint and destructiveHint, the description adds real substance: skip-exists default vs overwrite:true replacement, the loom-managed marker block and its embedded hash line, and the three re-run outcomes ('no-change'/'created'/'updated'). This tells the agent exactly what is overwritten and when the tool is safe to re-run.

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 core action and trigger in the first sentence, followed by the conditional `target` behavior. It is dense and the marker/hash detail is verbose, but every clause carries operational information rather than filler.

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 destructive, idempotent write tool with no output schema, the description covers the trigger, idempotency contract, destruction/replacement semantics, the conditional injection path, and the returned status strings — everything an agent needs to invoke and re-invoke it correctly.

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 goes beyond the schema by explaining the side effect of `target` (it additionally writes a marker-bounded block, typically into CLAUDE.md) and the exact behavior of `overwrite`. This adds meaning the schema's one-line parameter notes do not convey.

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?

Specific verb+resource ('Scaffold a harness manifest') with an exact destination path (<contextDir>/harnesses/<name>.md) and template source. It names the triggering signal ('identity() reports a missing manifest') so it is clearly separable from siblings like identity, bootstrap, and harness_describe.

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?

Explicitly states when to call it — when identity() reports a missing manifest — naming the sibling that produces the signal. It does not state when NOT to use it or name a direct alternative for existing manifests, so it stops just short of full routing guidance.

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