mcp-llm

generate_code_to_file

Generate code and write it directly to a file at a specific line number

Input Schema

NameRequiredDescriptionDefault
additionalContextNoAdditional context or requirements for the code
descriptionYesDescription of the code to generate
filePathYesPath to the file where the code should be written
languageNoProgramming language (e.g., JavaScript, Python, TypeScript)
lineNumberYesLine number where the code should be inserted (0-based)
replaceLinesNoNumber of lines to replace (0 for insertion only)

Input Schema (JSON Schema)

{ "properties": { "additionalContext": { "description": "Additional context or requirements for the code", "type": "string" }, "description": { "description": "Description of the code to generate", "type": "string" }, "filePath": { "description": "Path to the file where the code should be written", "type": "string" }, "language": { "description": "Programming language (e.g., JavaScript, Python, TypeScript)", "type": "string" }, "lineNumber": { "description": "Line number where the code should be inserted (0-based)", "type": "number" }, "replaceLines": { "description": "Number of lines to replace (0 for insertion only)", "type": "number" } }, "required": [ "description", "filePath", "lineNumber" ], "type": "object" }