Skip to content

forgeplan_init

Bootstraps a fresh Forgeplan workspace in the current directory. The agent calls this as the first MCP invocation when it detects a project that doesn’t yet have .forgeplan/ — for example after git clone on a new machine or when scaffolding a brand-new project from scratch. MCP invocations are implicitly non-interactive (no prompts), equivalent to CLI forgeplan init -y.

Category: Workspace & Data

  • First MCP call on a fresh clone — no .forgeplan/lance/ exists yet, agent needs a working index.
  • Scaffolding a new project from zero — agent will chain initnew prdvalidate.
  • Recovery after a wiped workspace — user deleted .forgeplan/ accidentally; agent re-creates structure and then calls forgeplan_import or forgeplan_scan_import to rebuild.
NameTypeRequiredDescription
forceboolno (default: false)Force reinitialize even if workspace exists.

Schema source: crates/forgeplan-mcp/src/server.rs::InitParams

A status JSON confirming the workspace was created. Reports whether a scan-import ran and how many artifacts were imported. If force=false and the directory already contains .forgeplan/, returns an error object the agent should surface to the user rather than silently overwrite.

Example response shape:

{
"ok": true,
"workspace": "/abs/path/.forgeplan",
"tables_created": ["artifacts", "links", "evidence"],
"scan_imported": 0
}
{ "force": false, "scan": true }

With typical agent context:

Agent just cloned a repo that tracks .forgeplan/*/ markdown but not the derived LanceDB index. It runs init with scan: true to recreate the index from tracked files.

{ "scan": true }

forgeplan_init is usually the very first MCP call in a fresh session, followed by forgeplan_list or forgeplan_health to verify the state. For destructive re-init, the agent should call forgeplan_export first, save the JSON, and only then pass force: true.

  • forgeplan init — same operation, interactive prompt skipped via -y