Skip to main content
Glama
remiehneppo

Code Generator MCP Server

by remiehneppo

generate_codebase_context

Generate function code using codebase context and coder expert model, optionally co-generating unit tests. Requires English parameters for accurate results.

Instructions

Generate code for a function with codebase context (Template 2) 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', 'description', '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
taskYes
languageYes
signatureYes
test_casesYes
constraintsNo
descriptionYes
existing_codeYes
interacts_withNo
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 the full burden. It does disclose that setting generate_test_file co-generates a unit test suite and that a 'coder expert model' is used, plus a notable English-only input constraint. It says nothing about how existing_code is used, permissions, latency, or failure behavior.

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 core capability is front-loaded in the first sentence, with the conditional test-generation behavior immediately after. The English-only block is verbose but earns its place as a hard invocation constraint; only the unexplained 'Template 2' reference is dead weight.

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 a 9-parameter, 6-required generation tool with zero schema coverage and no annotations, the description is far too thin. An output schema exists so return values need not be explained, but the caller is given no way to know what signature, existing_code, interacts_with, or test_cases should contain.

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% across 9 parameters, so the schema contributes no meaning and the description must compensate. It only names 'task', 'description', and 'constraints' as examples in the English-language note and explains generate_test_file; signature, existing_code, interacts_with, test_cases, and language are left entirely undefined.

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 code for a function with codebase context'), so an agent knows this produces code from existing code context. However, it does not differentiate itself from the close sibling generate_standard_function, and 'Template 2' is opaque internal jargon that carries no meaning for the caller.

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?

No guidance on when to choose this over generate_standard_function, generate_multi_function_module, or generate_bugfix_refactor, despite these being obvious alternatives. The only conditional behavior mentioned is the generate_test_file flag, which is not selection guidance.

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