Skip to content

forgeplan_generate

Creates a new artifact with a fully-authored body from a natural-language description. Unlike forgeplan_new (which produces an empty template stub), generate uses the configured LLM (OpenAI / Claude / Gemini / Ollama / any OpenAI-compatible endpoint) to draft all required sections in one call. The agent still needs to run forgeplan_validate afterwards because the LLM may miss MUST rules.

Category: Creating Artifacts

  • User provides a rich description and wants a ready-to-review first draft, not an empty stub.
  • Migrating a decision from chat history into a formal ADR — feed the chat summary as description.
  • Bulk bootstrap: turning an informal roadmap into 5 draft PRDs in one session.
NameTypeRequiredDescription
kindstringyesArtifact kind: prd, epic, spec, rfc, adr, problem, solution, evidence.
descriptionstringyesNatural language description of what to generate.

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

The new artifact ID plus the generated body. Unlike forgeplan_new, the agent can usually go straight to forgeplan_validate without an intermediate forgeplan_update — the body is already populated.

Example response shape:

{
"id": "PRD-043",
"kind": "prd",
"status": "draft",
"path": ".forgeplan/prds/prd-043-oauth2-login.md",
"body": "# PRD-043: OAuth2 login flow\n\n## Problem\n...",
"llm": { "provider": "gemini", "model": "gemini-3-flash-preview", "tokens": 1847 }
}
{ "kind": "prd", "description": "OAuth2 login flow" }

With typical agent context:

User pastes a one-paragraph feature description. Agent generates a full PRD draft instead of a blank stub.

{ "kind": "prd", "description": "Add OAuth2 login with Google and GitHub, support PKCE, 15m token TTL." }

forgeplan_route (confirm depth) → forgeplan_search (dup check) → forgeplan_generateforgeplan_validate → (fix any gaps via forgeplan_update) → forgeplan_reason (for Standard+) → forgeplan_activate.