Skip to main content
Glama

Build a feature

build_feature

Generate a feature via Codemind: takes a story title + acceptance criteria, generates the implementation and its tests, runs automated checks against the acceptance criteria before returning, and returns a buildId immediately. Call stream_build with the returned buildId to follow progress. See get_usage_guide for detailed usage guidance. If the build fails or the tool returns an error, the error text explains why and what to change.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "storyTitle": "<storyTitle>",
      "acceptanceCriteria": "<acceptanceCriteria>",
      "stackType": "<stackType>"
    },
    "name": "build_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
examplesNoOPTIONAL call → result examples, turned directly into test cases (no LLM), so the build is verified against exactly these. Each: { target: repo-relative .ts/.tsx path of the file under test, call: a TS expression such as "clamp(5, 0, 10)", imports?: export names the call uses (default: the component's main export), expected?: JSON value (compared with toEqual) OR throws?: error class name such as "RangeError", async?: true when the call returns a promise }. Exactly one of expected / throws per example; max 50. expected is JSON, so undefined, NaN, -0 and Dates cannot be expressed; describe those in acceptanceCriteria instead. For a new file every example must fail before the implementation exists; in patch mode at least one must fail against the current file (the rest act as regression guards). Only .ts/.tsx targets are supported.
projectIdNoOpaque identifier grouping related builds for CIL codebase context — omit to skip CIL entirely.
stackTypeYesRuntime target stack (free text). JavaScript/TypeScript (e.g. "worker", "typescript", "node", "react"), Swift (must start with "swift", e.g. "swift-ios") or Kotlin (must start with "kotlin", e.g. "kotlin-android"). python, go and rust are rejected with UNSUPPORTED_STACK_TYPE until each has measured success.
storyTitleYesShort title used to organize this build.
webhookUrlNoHTTPS URL to POST a signed payload to when the build reaches a terminal state (completed/failed). Must be supplied together with webhookSecret.
skipTestsForNoRepo-relative source paths (max 20) to opt OUT of test-file delivery for — e.g. the repo has no test framework and a scaffolded test file would be unwanted. Verification still ALWAYS runs against every component regardless of this setting — it only filters which files are DELIVERED to you, never whether verification happens. If the target project has NO test infrastructure at all, the build will very likely still fail even with this set — there is currently no fallback verification mode (e.g. typecheck-only) for that case. Explicit opt-in only, never infer from acceptanceCriteria prose.
existingFilesNoPATCH MODE — pass current content of files being modified. Without this, codegen creates new files instead of editing existing ones.
webhookSecretNoShared secret (16-256 chars) used to HMAC-SHA256-sign the webhook payload, sent in the x-codemind-v2-signature header. Must be supplied together with webhookUrl. Never echoed back.
acceptanceCriteriaYesDetailed requirements — function signatures, file paths, edge cases. Used verbatim to generate the implementation.
behaviorPreservingNoSet true ONLY when the requested change must not alter behavior (a refactor or simplification) and existingFiles supplies the file(s) being changed. Verification then accepts tests that already pass on the original code, and a result identical to the original is rejected; the result must still pass every test. Ignored for new files. Explicit opt-in only, never infer from acceptanceCriteria prose.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / stackType / description
      Previous value: -"Runtime target stack (free text). JavaScript/TypeScript only at launch, e.g. \"worker\", \"typescript\", \"node\", \"react\". python, go, swift-ios, kotlin-android and rust are rejected with UNSUPPORTED_STACK_TYPE until each has measured success."New value: +"Runtime target stack (free text). JavaScript/TypeScript (e.g. \"worker\", \"typescript\", \"node\", \"react\"), Swift (must start with \"swift\", e.g. \"swift-ios\") or Kotlin (must start with \"kotlin\", e.g. \"kotlin-android\"). python, go and rust are rejected with UNSUPPORTED_STACK_TYPE until each has measured success."
  2. Changed1 schema field changed
    • addedInput schema / properties / behaviorPreserving
      Added value: +{
      +  "description": "Set true ONLY when the requested change must not alter behavior (a refactor or simplification) and existingFiles supplies the file(s) being changed. Verification then accepts tests that already pass on the original code, and a result identical to the original is rejected; the result must still pass every test. Ignored for new files. Explicit opt-in only, never infer from acceptanceCriteria prose.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only state readOnlyHint=false and destructiveHint=false, so the description carries the real behavioral load and does it well: it discloses that generation is asynchronous (returns buildId immediately), that verification runs against acceptance criteria before returning, and that failures surface explanatory error text. That async-and-verify contract is exactly the behavior an agent needs and cannot get from the annotations.

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?

Four sentences, each doing distinct work: what it does, the async follow-up, where to find deeper guidance, and the failure path. It is front-loaded with the core action and the buildId/stream_build handoff, with no filler or repetition of the title.

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 ten-parameter mutating codegen tool with no output schema, the description covers the critical contract: immediate buildId, background verification, and error semantics. The remaining gap is what comes back besides the buildId — the response shape and how delivered files are retrieved (get_build_files exists as a sibling but is never named) — so an agent still needs to probe for results.

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 the schema already documents all ten parameters in depth, including patch-mode, examples, role, and skipTestsFor semantics. The description only restates the two headline inputs (storyTitle, acceptanceCriteria) and adds no new parameter meaning, which is the expected baseline-3 outcome 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?

The description opens with a specific verb plus resource ("Generate a feature via Codemind") and immediately names its inputs (story title + acceptance criteria) and outputs (implementation, tests, buildId). It is clearly distinguishable from stream_build and get_usage_guide, which it references. It stops short of distinguishing itself from sibling generators like build_from_spec or build_batch, so it's clear but not fully sibling-differentiated.

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?

It gives clear operational context: call stream_build with the returned buildId to follow progress, consult get_usage_guide for detailed guidance, and read the error text on failure. What's missing is when to choose this tool over sibling build paths (build_from_spec, build_batch) and any explicit when-not conditions; the detailed guidance is deferred to another tool rather than stated here.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources