Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Generate Python Code

cc_generate_python_code
Read-onlyIdempotent

Generate Python code snippets from BACH-derived templates without writing files, supporting functions, classes, dataclasses, CLIs, tests, exceptions, and modules.

Instructions

Generiert Python-Code-Snippets aus BACH-abgeleiteten Templates ohne Dateien zu schreiben

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cc_generate_python_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
actNoAct block for test generation
baseNoBase exception class for exception generation
bodyNoFunction or method body
kindNoTemplate kind
nameNoGenerated item name
targetNoTarget name for test generation
arrangeNoArrange block for test generation
contentNoModule content
docstringNoDocstring
main_bodyNoCLI main body
spec_jsonNoOptional full JSON spec. If set, it is merged with the explicit fields.
assertionsNoAssert block for test generation
bases_jsonNoJSON array of class base names
descriptionNoModule or CLI description
fields_jsonNoJSON array of dataclass fields
params_jsonNoJSON array of parameters: [{"name":"x","type":"int","default":"0"}]
return_typeNoReturn type annotation for functions
imports_jsonNoJSON array of import lines for module generation
init_params_jsonNoJSON array of __init__ parameters for classes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.27
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv1.3.16

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, and "ohne Dateien zu schreiben" largely restates that. The description adds nothing about the behaviors that actually matter here: that different `kind` values require disjoint parameter subsets, how invalid or incomplete specs are handled, or what form the generated snippet is returned in.

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?

A single tightly written sentence with the output artifact and the no-side-effect constraint front-loaded; no filler. It is efficient, though its brevity is partly the cause of the gaps elsewhere.

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?

With 19 optional parameters, a 7-value kind enum driving conditional requirements, and no output schema, the description is far too thin. It gives no guidance on which fields are needed per kind or what the returned snippet looks like, leaving the agent to reverse-engineer usage from the schema alone.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3 and the schema already documents all 19 fields, including spec_json's merge behavior. The description contributes no parameter meaning at all, which is notable because the conditional relationship between `kind` and the rest of the fields is the hardest part of using this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The verb and resource are specific ("Generiert Python-Code-Snippets", i.e. generate Python code snippets), and the trailing "ohne Dateien zu schreiben" separates it from file-mutating siblings like cc_python_structural_edit. However, "BACH-abgeleitete Templates" is unexplained jargon and the description never mentions the `kind` enum that actually determines what output is produced, so an agent cannot tell what variants of code it can generate.

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 an implicit contrast ("without writing files"), but no explicit when-to-use, when-not-to-use, or named alternative among the 20+ siblings. An agent must infer on its own that this is the snippet-emission tool versus cc_python_structural_edit or cc_generate_licenses.

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