Skip to main content
Glama
remiehneppo

Code Generator MCP Server

by remiehneppo

generate_bugfix_refactor

Fix or refactor code by generating corrected or improved implementations from current code, problem, expected behavior, and test cases; optionally co-generate unit tests.

Instructions

Generate fixed or refactored code (Template 3) using coder expert model.

If generate_test_file is True, it will co-generate a matching unit test suite.

IMPORTANT: All parameters (such as 'task', 'problem', 'expected_behavior', 'constraints', etc.) MUST be provided in English. If the user's prompt or request is in Vietnamese or another language, the calling agent must automatically translate the text of these parameter values into English before invoking this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNo
problemYes
languageYes
test_casesYes
constraintsNo
current_codeYes
expected_behaviorYes
generate_test_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It usefully discloses one real behavioral constraint (all text parameters must be supplied in English, with a translation instruction) and the test co-generation behavior, but it says nothing about permissions, output format, limits, or what happens on failure.

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?

Front-loaded with the core purpose in the first sentence, followed by two focused notes. The English/translation block is somewhat verbose but carries genuinely actionable information, so it earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter generation tool with zero schema descriptions, no annotations, and only partial parameter coverage, the description is thin. The output schema existing means return values need no explanation, but the input semantics and usage routing are largely missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for all 8 parameters, so the description must compensate but does not. It names a few fields (task, problem, expected_behavior, constraints, generate_test_file) only to impose the English requirement, without explaining what language, current_code, or test_cases mean or how task differs from problem.

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?

States a specific verb and resource ('Generate fixed or refactored code') and references 'Template 3' plus the coder expert model, so the agent understands the operation. However, it does not distinguish itself from siblings like generate_standard_function or generate_multi_function_module, leaving the boundary inferred.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus the sibling generators (standard function, multi-function module). The only conditional behavior mentioned is generate_test_file co-generation, which is a parameter effect rather than a when-to-use rule.

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