Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Extract Classes

cc_extract_classes
Idempotent

Extract Python classes and functions from a file into separate text blocks for code review or documentation. Optionally write them to an output directory.

Instructions

Extracts Python classes and functions from a file as separate text blocks.

Args:

  • path (string): Path to the Python file

  • output_dir (string, optional): Output directory (otherwise display only)

  • include_content (boolean, optional): Include pycutter-style code blocks in the response

  • max_chars (number, optional): Maximum response characters for included code

Useful for code review and documentation.

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_extract_classes"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the Python file
max_charsNoMaximum characters of included extracted content
output_dirNoOutput directory
include_contentNoInclude extracted class/helper content in the MCP response

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.27
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv1.3.16
    • addedInput schema / properties / include_content
      Added value: +{
      +  "default": false,
      +  "description": "Include extracted class/helper content in the MCP response",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "default": 12000,
      +  "description": "Maximum characters of included extracted content",
      +  "maximum": 100000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
  3. First observedv1.3.8

TDQS

B3.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false with destructiveHint=false and idempotentHint=true; the description is consistent with that, and usefully clarifies that when output_dir is supplied files get written, otherwise results are "display only." That is real value beyond the annotations. It stops short of saying what happens on overwrite of an existing output directory or how errors surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and short, which is good, but the Args block largely re-transcribes a schema that already has 100% description coverage, so several lines do not earn their place. The trailing "Useful for code review" sentence is filler relative to the missing when-not guidance.

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

Completeness3/5

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

With no output schema, the description carries the burden of explaining the return shape, and it only partially does: it says classes/functions come back as separate text blocks and that include_content controls whether code is included, but it never says what is returned when include_content is false, nor what the written files look like. Adequate but with a real gap for an agent predicting the result.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description earns above baseline by clarifying output_dir's fallback behavior ("otherwise display only") and by describing include_content as pycutter-style code blocks in the response rather than merely "extracted content." The max_chars arg is only restated though, adding nothing over the schema's range and default.

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: extracts Python classes and functions from a file as separate text blocks. That is clear and concrete. It does not differentiate itself from nearby siblings such as cc_analyze_code or cc_analyze_methods, so an agent cannot tell from the description alone which of these three to pick.

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?

"Useful for code review and documentation" is the only usage context, and it is a generic benefit statement rather than a condition for choosing this tool. There is no mention of when not to use it, no prerequisites (does the file need to exist, does output_dir need to exist?), and no routing to the competing analysis siblings.

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