Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Organize Imports

cc_organize_imports
Idempotent

Organize Python imports per PEP 8 by sorting, deduplicating, and grouping them into future, stdlib, third-party, and local sections; supports dry-run previews.

Instructions

Organizes Python imports per PEP 8: sorted, deduplicated, grouped.

Args:

  • path (string): Path to the Python file

  • dry_run (boolean): Preview only

Groups: 1) future 2) stdlib 3) third-party 4) local

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>"
    },
    "name": "cc_organize_imports"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the Python file
dry_runNoPreview only

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.27
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.3.8

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the safety profile is covered structurally. The description usefully discloses the transformation semantics (sorting, deduplication, four grouping tiers) and the dry-run preview. It does not say the file is rewritten in place, nor what happens to comments, blank lines, or unused imports during deduplication — relevant for a mutating tool.

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 purpose sentence, then optional Args, then the grouping order — short and scannable. The Args block duplicates the schema and slightly bloat an otherwise tight definition, but no sentence is wasted.

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

Completeness4/5

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

For a two-parameter, non-destructive, idempotent file transform with full schema coverage and annotations, the description covers purpose, transformation behavior, and dry-run. The lack of any statement about return values or in-place rewrite behavior is the only meaningful gap, and with no output schema that is a minor omission.

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 schema already documents both parameters; the description's Args block merely restates 'Path to the Python file' and 'Preview only' verbatim. No added semantics such as path format, relative-vs-absolute resolution, or whether dry_run returns a diff versus formatted text.

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 plus the standard applied: 'Organizes Python imports per PEP 8: sorted, deduplicated, grouped.' An agent can tell this transforms file content, not just reports on it. It does not, however, explicitly distinguish itself from the sibling cc_diagnose_imports, which an agent may reasonably confuse for this task.

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

Usage Guidelines3/5

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

'dry_run (boolean): Preview only' implies a safe trial path, which hints at a workflow (preview then apply), but there is no explicit when-to-use, when-not-to-use, or guidance versus cc_diagnose_imports (diagnose) or cc_python_structural_edit (edit). Usage is only implied by the tool's name and purpose.

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