Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

generate_file

Generate new source files from plain-English specifications. Produces boilerplate, scaffolding, test fixtures, or single-file utilities, with optional AI review before writing to the target path.

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
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it warns of destructive behavior when review:false, explains default non-destructive review mode, notes parent directory creation, mentions sibling test file side effect for includeTests, and details return statuses. This is exemplary transparency beyond what any schema could convey.

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 thorough but efficiently structured, front-loading the core purpose and flow, then use cases, warnings, and return values. While slightly long, every sentence carries information. Some redundancy could be trimmed (e.g., both 'Claude either reviews' and 'default review:true is non-destructive' say similar things), but overall it is well organized and not bloated.

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?

Given the tool's complexity, lack of output schema, and rich parameter structure, the description fully covers usage context, side effects, return payload, and review mode behavior. It also ties the output to write_files_atomic for applying reviewed content, ensuring the agent knows exactly what to expect and how to proceed.

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% at top level, with options sub-properties well described. The description adds valuable semantics: clarifies the review flow, explains contextFiles purpose for style anchoring, notes includeTests creates a sibling test file, and defines what each status means. This compensates for the coverage gap and enriches parameter understanding.

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 specific verb and resource: 'Generate a new file from a natural-language spec.' It explicitly scopes to fresh files (boilerplate, scaffolding, test fixtures, single-file utilities) and names sibling tools for contrast, making the tool's unique purpose immediately clear.

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?

Provides explicit when-to-use guidance ('Use for fresh files you can describe by goal') and when-not-to-use with named alternatives: 'For editing an EXISTING file, use modify_file' and 'For writing a known content string to disk with no LLM involved, use write_files_atomic.' This leaves no ambiguity about when to select this tool.

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

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