Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Python Structural Edit

cc_python_structural_edit

Preview, test, or apply structural Python edits by line, element, or class with syntax checks and backup protection.

Instructions

Prüft und wendet BACH-abgeleitete strukturelle Python-Edits mit Vorschau, Testdatei und Backup-Schutz an

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "operation": "<operation>"
    },
    "name": "cc_python_structural_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineNo1-based line for position=line or replace_line
modeNopreview returns a diff, test writes a .test.py file, apply writes the sourcepreview
pathYesPython file to inspect or edit
contentNoInserted code or replacement line content
elementNoClass/function/method name, e.g. MyClass.method
elementsNoComma-separated element names for create_edit_file
positionNoInsert position for operation=insert
edit_fileNoEdit file path for merge_edit_file
operationYesStructural edit operation
class_nameNoTarget class for position=in_class
output_pathNoOptional output path for test or edit-file modes
python_pathNoPython executable path for syntax checks
syntax_checkNoCompile-check edited Python before writing
create_backupNoCreate a backup when mode=apply
indent_spacesNoIndent inserted non-empty lines

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.3.27
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / line / maximum
      Added value: +9007199254740991
  2. Addedv1.3.16

TDQS

C2.8/5.0
Behavior3/5

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

The description adds real context beyond the annotations: it discloses the preview step, the .test.py intermediate, and backup protection, which together mitigate the fact that mode=apply rewrites source files despite destructiveHint=false. However, it never states explicitly that apply overwrites the original source, nor what happens if the syntax check fails or whether repeated applies are safe (idempotentHint=false).

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 front-loaded sentence with no padding, and the safety-relevant features (preview, test file, backup) appear before the trailing verb. The only waste is the opaque qualifier "BACH-abgeleitet", which consumes space without informing.

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 15-parameter tool with six operations, three modes, and no output schema, one sentence is far too thin. An agent cannot learn from the description which parameters pair with which operation, what preview returns, or how create_edit_file/merge_edit_file workflows differ from a direct insert. The schema carries nearly all the load.

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 every one of the 15 parameters, including the mode enum and position enum, is already documented in the schema. The description adds no format details, constraints, or interaction rules (e.g. which parameters are required per operation) beyond what the schema provides. Baseline 3.

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?

"Prüft und wendet ... strukturelle Python-Edits ... an" gives a verb and a resource, but the resource phrase "BACH-abgeleitete" is unexplained jargon and the six available operations (insert, delete, replace_line, create_edit_file, merge_edit_file, inspect) are never named. Nothing distinguishes it from siblings such as cc_generate_python_code or cc_cleanup_file, which an agent could plausibly pick for the same goal.

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 when-to-use guidance, no prerequisites, no exclusions, and no mention of the sibling tools that overlap (cc_organize_imports, cc_cleanup_file). The preview→test→apply progression is the central decision an agent must make here, yet it appears only as a keyword list rather than as a usage rule.

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