Skip to main content
Glama

Delimit Generate Template

delimit_generate_template
Destructive

Generate a single code file from a template into an existing project, scaffolding framework-conformant components, pages, or API handlers without hand-writing boilerplate.

Instructions

Write a single file from a code template into an existing project.

When to use: when an existing project needs one more piece — a component, a page, an API handler — and you want the framework-conformant skeleton (imports, exports, default structure) rather than hand-writing the boilerplate. Pair with delimit_test_generate to scaffold the matching test file. When NOT to use: to lay out a fresh project (use delimit_generate_scaffold), to design a UI component with tokens (delimit_design_generate_component), or to bulk-generate many files (call this once per file, or write a custom script).

Sibling contrast: delimit_generate_scaffold lays out a complete project tree; this writes a single file. Compared to delimit_design_generate_component, this is framework-only and does not consume design tokens. Compared to delimit_test_generate, this writes source, not tests.

Side effects: writes ONE file to disk under target/ via backends.generate_bridge.template. target is sanitised via _sanitize_path — paths escaping the workspace short-circuit with an error. features is coerced from a comma string to a list via _coerce_list_arg. No license gate, no ledger write, no notification. If a file with the same name already exists, the backend determines overwrite vs. error — call with care on populated directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the generated code (file stem). Required.
targetNoOutput directory. Default "." (cwd). Sanitized to remain inside the workspace..
featuresNoOptional feature flags as a comma string or list.
frameworkNoTarget framework key, e.g. "react", "nextjs", "fastapi".nextjs
template_typeYesTemplate flavour, e.g. "component", "page", "api". Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv4.7.9
    • changedInput schema / properties / features / description
      Previous value: -"Optional feature flags."New value: +"Optional feature flags as a comma string or list."
    • changedInput schema / properties / framework / description
      Previous value: -"Target framework."New value: +"Target framework key, e.g. \"react\", \"nextjs\", \"fastapi\"."
    • changedInput schema / properties / name / description
      Previous value: -"Name for the generated code."New value: +"Name for the generated code (file stem). Required."
    • changedInput schema / properties / target / description
      Previous value: -"Directory to write the generated file into. Defaults to current directory."New value: +"Output directory. Default \".\" (cwd). Sanitized to remain inside the workspace."
    • changedInput schema / properties / template_type / description
      Previous value: -"Template type (component, page, api, etc.)."New value: +"Template flavour, e.g. \"component\", \"page\", \"api\". Required."
  2. Changed6 schema fields changedv4.5.5
    • changedInput schema / properties / features / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / features / description
      Added value: +"Optional feature flags."
    • addedInput schema / properties / framework / description
      Added value: +"Target framework."
    • addedInput schema / properties / name / description
      Added value: +"Name for the generated code."
    • addedInput schema / properties / target
      Added value: +{
      +  "default": ".",
      +  "description": "Directory to write the generated file into. Defaults to current directory.",
      +  "type": "string"
      +}
    • addedInput schema / properties / template_type / description
      Added value: +"Template type (component, page, api, etc.)."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

The description goes well beyond the destructiveHint annotation by disclosing precise side effects: writes exactly ONE file under target/, path sanitization that short-circuits on escape, feature-string coercion, absence of license/ledger/notification side effects, and the critical overwrite-or-error ambiguity on existing files. For a destructive tool, this is exactly the behavioral disclosure an agent needs before calling.

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?

The description is well-structured with labeled sections (When to use, When NOT to use, Sibling contrast, Side effects) and front-loads the core purpose. It is verbose, and the sibling contrast section partially restates the when-not-to-use routing, but for a destructive multi-parameter tool the density of information justifies the length.

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?

Everything an agent needs before invoking a 5-parameter file-writing tool is present: purpose, routing conditions, side effects, overwrite risk, internal behavior details, and what it does NOT do. The output schema covers return values, so no description burden there. The only conceivable addition would be an example, which is not required for correctness.

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 with the schema doing the heavy lifting. The description adds genuine value by revealing two parameters' runtime behavior: target undergoes _sanitize_path with workspace-escape errors, and features is coerced from comma string to list. This is non-obvious information an agent couldn't infer from the schema alone.

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 opening line states a specific verb-resource pair ('Write a single file from a code template into an existing project') that immediately distinguishes it from bulk-generation or design-token tools. The sibling contrast confirms the exact boundaries: scaffold writes a full tree, design consumes tokens, test writes tests — leaving no ambiguity about what this tool is for.

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?

Explicit 'When to use' and 'When NOT to use' sections name the exact alternatives (delimit_generate_scaffold, delimit_design_generate_component, delimit_test_generate) and the conditions that select them. It even handles the bulk-generation edge case by instructing one call per file. Nothing is left to inference.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/delimit-ai/delimit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server