Skip to main content
Glama

brain_setup

Idempotent

Initialize BrainOS project state when no store exists: preview proposed files and confirm before writing, without overwriting existing instructions.

Instructions

Set up Brain OS in a project folder when no store exists yet (tools return 'No Brain OS store found'). Two steps, never skip the first: (1) call with no confirm — returns the proposed folder, a question for the user, and the exact files that would be created, refreshed, or preserved; nothing is written. It also returns a single-use preview_token. (2) Only after the user explicitly says yes, call again with confirm=true, the same target_dir and options, and that preview_token; writes without a matching token are refused. Existing instruction files are never overwritten; any that need a Brain OS line are listed in plan.needsIntegration — tell the user. Writes nothing outside the project unless include_user_protocol=true. If a store already exists, it reports that and does nothing.

Input Schema

NameRequiredDescriptionDefault
confirmNotrue only after the user approved the folder and plan from the preview call.
minimalNoInstall only AGENTS.md + CLAUDE.md instruction files, skip Copilot/Cursor/Zed/Windsurf pointers.
target_dirNoAbsolute path of the project folder. Required with confirm=true. Must be inside an open workspace folder when the client reports them.
preview_tokenNoToken from the preview call. Required with confirm=true; single-use, expires after 15 minutes.
include_commandsNoInstall Claude Code slash commands into .claude/commands. Default true.
include_user_protocolNoAlso write ~/.claude/brain-os/PROTOCOL.md in the home folder. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: the first call writes nothing, returns a plan and preview_token, and the second call is refused without a matching token. It also discloses file preservation behavior, plan.needsIntegration, scope limits around include_user_protocol, and the no-op behavior when a store exists, all of which are critical for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite its length, the description is tightly structured: it front-loads the purpose, numbers the two required steps, and includes only decision-relevant constraints. Every sentence supports correct invocation or safe behavior.

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?

This is a multi-step setup tool with no output schema, yet the description explains what the preview call returns, what the confirm call requires, and how existing files and integration needs are surfaced. Combined with annotations covering idempotency and non-destructiveness, the description is complete for correct use.

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 six parameters are already documented in the schema. The description reinforces the confirm/preview_token workflow and include_user_protocol's scope, but does not add parameter details beyond what the schema provides, so the baseline of 3 is appropriate.

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?

The description states a specific verb and resource: set up Brain OS in a project folder, and adds the precise condition that no store exists yet. It also explains the observable trigger for the agent ('No Brain OS store found'), making the purpose unambiguous.

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?

It explicitly says when to use the tool (when no store exists), what to do when a store already exists (it reports and does nothing), and prescribes the exact two-step workflow. It clearly states that confirm=true must only be used after explicit user approval, leaving no ambiguity about sequencing.

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