code-ast-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| analyze_file_astB | Parse a Python file using Python's AST parser and return a detailed outline of its docstrings, imports, top-level classes, functions, variables, and line counts. :param file_path: Path to the Python (.py) file to analyze. |
| find_class_methodsA | Locate a specific class within a Python file and retrieve all its methods, argument signatures, type annotations, line numbers, and docstrings. :param file_path: Path to the Python file containing the class. :param class_name: Name of the target class to inspect. |
| find_symbolA | Recursively search a directory or file for classes, functions, methods, or variables matching the target symbol name. :param target_dir: Directory path or file path to search. :param symbol_name: Name or partial name of the symbol to search for. |
| get_imports_graphA | Scan all Python files in a directory to build an import dependency graph and output both a structured map and a Mermaid diagram definition. :param target_dir: Path to the directory containing Python files. |
| find_missing_docstringsB | Audit Python files in a directory to identify modules, classes, and functions that lack docstrings, calculating overall docstring coverage percentage. :param target_dir: Directory path to audit. :param include_private: Whether to include private functions/methods (starting with '_'). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| refactor_code_summary | Generate a prompt guiding the LLM to inspect the AST outline of a Python file and provide actionable code refactoring, architectural, and documentation advice. :param file_path: Path to the target Python file for refactoring review. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_workspace_ast_stats | Provide high-level AST statistics for the current workspace. |
TDQS
Scored across 5 tools
Each tool has a distinct role: file outline, class methods, symbol search, import graph, and docstring audit. There is minor overlap because analyze_file_ast, find_class_methods, and find_symbol all inspect Python definitions, but their scopes differ enough to guide selection.
All tool names use snake_case and mostly follow a verb_target pattern. Three use find_, while analyze_file_ast and get_imports_graph deviate slightly, but the naming remains predictable and readable.
Five tools is a well-scoped size for an AST inspection server. Each tool serves a distinct static analysis workflow without redundancy or bloat.
The set covers file outlines, class methods, symbol lookup, import graphs, and docstring coverage, which handles most Python code-inspection needs. Minor gaps exist, such as a dedicated detail view for standalone functions or arbitrary AST node inspection, but they are not critical.