Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

generate_file

Generate new files from natural-language specs, with optional review before writing. For boilerplate, scaffolding, tests, and utilities, optionally matching existing code style.

Instructions

Generate a new file from a natural-language spec. The local LLM writes the code; Claude either reviews the proposed content (review:true, default) or it gets written directly to outputPath (review:false). Use for fresh files you can describe by goal — boilerplate, scaffolding, test fixtures, single-file utilities. For editing an EXISTING file, use modify_file. For writing a known content string to disk with no LLM involved, use write_files_atomic. Optionally pass contextFiles to anchor the generated style on existing code. ⚠️ DESTRUCTIVE when review:false: writes (and creates parent directories of) outputPath. If includeTests:true, also writes a sibling test file. The default (review:true) is non-destructive — returns the generated content for Claude to inspect first. Returns: {success, status:'written'|'written_truncated'|'pending_review', outputPath, summary, linesOfCode, language, testPath (when includeTests), backend_used, processing_time, retry_attempts, was_truncated}. In review mode the response also carries the generated content for Claude to apply via write_files_atomic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesNatural language specification for the code to generate
optionsNo
outputPathYesWhere to write the generated file

Schema Changelog

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

  1. Changed1 schema field changedv2.14.0
    • changedInput schema / properties / options / properties / backend / enum
      Previous value: -[
      -  "auto",
      -  "local",
      -  "deepseek",
      -  "glm",
      -  "qwen3",
      -  "gemini",
      -  "groq"
      -]New value: +[
      +  "auto",
      +  "local",
      +  "deepseek",
      +  "glm",
      +  "gemini",
      +  "groq"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / options / properties / backend / enum
      Previous value: -[
      -  "auto",
      -  "local",
      -  "deepseek",
      -  "qwen3",
      -  "gemini",
      -  "groq"
      -]New value: +[
      +  "auto",
      +  "local",
      +  "deepseek",
      +  "glm",
      +  "qwen3",
      +  "gemini",
      +  "groq"
      +]
  3. Addedv1.3.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and meets it. It warns '⚠️ DESTRUCTIVE when review:false' and details that it writes and creates parent directories of outputPath, optionally writes a sibling test file, and that review:true is non-destructive. It also discloses the return shape and the fact that review mode returns content for Claude to apply later. This is thorough and goes well beyond a minimal disclosure.

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 long but packed with necessary information. It front-loads the core purpose and usage, then layers destructive warnings and return details. Every sentence adds value; there is no fluff. It could be slightly tighter by trimming the speculative return enumeration, but overall it is well-structured and no section is redundant.

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?

The tool is complex with two modes, destructive behavior, and a detailed return object. The description covers purpose, usage, alternatives, the review vs. direct-write decision, destructive warning, return schema, and how to apply content in review mode. Since there is no output schema, the explicit mention of the return fields is essential and provided. Nothing an agent needs to call it correctly is missing.

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 67% (spec and outputPath have descriptions; the options object itself lacks a description, though its properties are documented). The description adds meaning by explaining the role of each option: review mode's purpose, contextFiles for style anchoring, includeTests for sibling file generation, and the backend parameter's effect. It clarifies that outputPath is where the file is written. This compensates for the missing top-level option description, though not every edge case (e.g., backend choices) is detailed—still a strong addition.

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 opens with a precise statement: 'Generate a new file from a natural-language spec.' It identifies the verb (generate), the resource (file), and the input (natural-language spec). It also explicitly names sibling tools (modify_file, write_files_atomic) and states what they are for, making differentiation immediate. No ambiguity remains about the tool's core function.

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?

Usage guidance is explicit: 'Use for fresh files you can describe by goal' and then directly contrasts with alternatives: 'For editing an EXISTING file, use modify_file. For writing a known content string to disk with no LLM involved, use write_files_atomic.' It also explains the review vs. direct-write decision and the optional contextFiles, covering both when and when-not to use the tool.

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

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/Platano78/Smart-AI-Bridge'

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