tree-sitter-analyzer


Nametree-sitter-analyzer JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryExtensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
upload_time2025-07-31 03:56:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords ai-tools ast code-analysis mcp mcp-server model-context-protocol multi-language parsing static-analysis tree-sitter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tree-sitter Analyzer

[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Tests](https://img.shields.io/badge/tests-1251%20passed-brightgreen.svg)](#测试)

An extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture, designed to solve the problem of large code files exceeding LLM single-pass token limits.

**Available as both CLI tool and MCP server.**

## Core Features

1. **Code Scale Analysis** - Get overall structure without reading complete files
2. **Targeted Code Extraction** - Extract specific line ranges efficiently  
3. **Code Position Information** - Get detailed position data for precise extraction

## Installation

### Prerequisites

First, install uv (a fast Python package manager):

```bash
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Or using pip
pip install uv
```

### Install from GitHub

```bash
# Basic installation with Java support
# Clone and install the project
git clone https://github.com/aimasteracc/tree-sitter-analyzer.git
cd tree-sitter-analyzer

# Install with Java support
uv sync

# With popular languages (Java, Python, JavaScript, TypeScript)
uv sync --extra popular

# With MCP server support
uv sync --extra mcp

# Full installation with all features
uv sync --extra all --extra mcp
```

## Usage

### CLI Commands

```bash
# Code scale analysis
uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text

# Partial code extraction
uv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86

# Position information table
uv run python -m tree_sitter_analyzer examples/Sample.java --table=full
```

#### CLI Output Examples

**Code Scale Analysis (`--advanced --output-format=text`):**

>```
>PS C:\git-public\tree-sitter-analyzer> uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text
>2025-07-30 16:57:47,827 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python
>2025-07-30 16:57:47,916 - tree_sitter_analyzer - INFO - CacheService initialized: L1=100, L2=1000, L3=10000, TTL=3600s
>2025-07-30 16:57:47,917 - tree_sitter_analyzer - INFO - Loading plugins...
>2025-07-30 16:57:47,920 - tree_sitter_analyzer - INFO - Plugin registered for language: java
>2025-07-30 16:57:47,920 - tree_sitter_analyzer - INFO - Plugin registered for language: javascript
>2025-07-30 16:57:47,922 - tree_sitter_analyzer - INFO - Plugin registered for language: python
>2025-07-30 16:57:47,922 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python     
>2025-07-30 16:57:47,923 - tree_sitter_analyzer - INFO - UnifiedAnalysisEngine initialized
>INFO: Language auto-detected from extension: java
>2025-07-30 16:57:47,925 - tree_sitter_analyzer - INFO - Starting analysis for examples/Sample.java
>2025-07-30 16:57:47,945 - tree_sitter_analyzer.core.parser - INFO - Parser initialized successfully
>2025-07-30 16:57:47,951 - PERF - analyze_java: 0.0253s - Operation completed
>2025-07-30 16:57:47,951 - tree_sitter_analyzer.performance - INFO - analyze_java: 0.0253s - Operation completed
>2025-07-30 16:57:47,958 - PERF - unified_analysis: 0.0253s - Analyzed examples/Sample.java (java)
>2025-07-30 16:57:47,958 - tree_sitter_analyzer.performance - INFO - unified_analysis: 0.0253s - Analyzed examples/Sample.java (java)
>
>--- Advanced Analysis Results ---
>"File: examples/Sample.java"
>"Package: (default)"
>"Lines: 178"
>"Classes: 8"
>"Methods: 24"
>"Fields: 5"
>"Imports: 2"
>"Annotations: 0"
>```

**Partial Code Extraction (`--partial-read`):**
>```
>PS C:\git-public\tree-sitter-analyzer> uv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86
>2025-07-30 16:58:22,948 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python
>2025-07-30 16:58:23,056 - tree_sitter_analyzer - INFO - Successfully read partial file examples/Sample.java: lines 84-86
>{
>  "file_path": "examples/Sample.java",
>  "range": {
>    "start_line": 84,
>    "end_line": 86,
>    "start_column": null,
>    "end_column": null
>  },
>  "content": "        public void innerMethod() {\n            System.out.println(\"Inner class method, value: \" + value);\n        }\n",
>  "content_length": 117
>}
>```

**Table Format Analysis (`--table=full`):**

The `--table=full` command produces detailed analysis tables:


># Sample.java
>
>## Imports
>```java
>java.util.List
>java.util.ArrayList
>```
>
>## Classes
>| Class | Type | Visibility | Lines | Methods | Fields |
>|-------|------|------------|-------|---------|--------|
>| AbstractParentClass | class | public | 7-15 | 2 | 0 |
>| ParentClass | class | public | 18-45 | 4 | 2 |
>| TestInterface | class | public | 48-64 | 3 | 0 |
>| AnotherInterface | class | public | 67-69 | 1 | 0 |
>| Test | class | public | 72-159 | 14 | 3 |
>| InnerClass | class | public | 83-87 | 1 | 0 |
>| StaticNestedClass | class | public | 90-94 | 1 | 0 |
>| TestEnum | class | public | 162-178 | 0 | 0 |
>
>## Fields
>| Name | Type | Vis | Modifiers | Line | Doc |
>|------|------|-----|-----------|------|-----|
>| CONSTANT | String | ~ | static,final | 20 | - |
>| parentField | String | # | protected | 23 | - |
>| value | int | - | private | 74 | - |
>| staticValue | int | + | public,static | 77 | - |
>| finalField | String | - | private,final | 80 | - |
>
>## Constructor
>| Method | Signature | Vis | Lines | Cols | Cx | Doc |
>|--------|-----------|-----|-------|------|----|----|
>| ParentClass | ():void | + | 26-28 | 5-6 | 1 | - |
>| Test | (value:int):void | + | 97-100 | 5-6 | 1 | - |
>| Test | ():void | + | 103-105 | 5-6 | 1 | - |
>
>## Public Methods
>| Method | Signature | Vis | Lines | Cols | Cx | Doc |
>|--------|-----------|-----|-------|------|----|----|
>| innerMethod | ():void | + | 84-86 | 5-6 | 1 | - |
>| nestedMethod | ():void | + | 91-93 | 5-6 | 1 | - |
>| getValue | ():String | + | 108-110 | 5-6 | 1 | - |
>| staticMethod | ():void [static] | + | 128-130 | 5-6 | 1 | - |
>| finalMethod | ():void | + | 133-135 | 5-6 | 1 | - |
>| doSomething | ():void | + | 138-141 | 5-6 | 1 | - |
>| anotherMethod | ():void | + | 143-146 | 5-6 | 1 | - |
>| genericMethod | (input:T):void | + | 149-151 | 5-6 | 1 | - |
>| createList | (item:T):List<T> | + | 154-158 | 5-6 | 1 | - |
>
>## Private Methods
>| Method | Signature | Vis | Lines | Cols | Cx | Doc |
>|--------|-----------|-----|-------|------|----|----|
>| privateMethod | ():void | - | 123-125 | 5-6 | 1 | - |


### MCP Server

The Tree-sitter Analyzer provides an MCP (Model Context Protocol) server that enables AI assistants to analyze code files directly.


#### MCP Configuration

Add to your Claude Desktop config file:

```json
{
  "mcpServers": {
    "tree-sitter-analyzer": {
      "command": "uv",
      "args": [
        "run", 
        "--with", 
        "tree-sitter-analyzer[mcp]",
        "python", 
        "-m", 
        "tree_sitter_analyzer.mcp.server"
      ]
    }
  }
}
```

#### Available MCP Tools

1. **analyze_code_scale** - Get code scale and complexity metrics
2. **format_table** - Generate table-formatted analysis (equivalent to CLI `--table=full`)
3. **read_code_partial** - Extract specific line ranges from files
4. **analyze_code_universal** - Universal code analysis with automatic language detection

#### MCP Usage Examples

**Code Scale Analysis:**
```json
{
  "tool": "analyze_code_scale",
  "arguments": {
    "file_path": "examples/Sample.java",
    "include_complexity": true,
    "include_details": true
  }
}
```

>```json
>{
>  "file_path": "examples/Sample.java",
>  "language": "java",
>  "analyzer_type": "advanced",
>  "analysis_type": "basic",
>  "metrics": {
>    "lines_total": 178,
>    "lines_code": 0,
>    "lines_comment": 0,
>    "lines_blank": 0,
>    "elements": {
>      "classes": 8,
>      "methods": 24,
>      "fields": 5,
>      "imports": 2,
>      "annotations": 0
>    }
>  }
>}
>```

**Table Format Analysis:**
```json
{
  "tool": "format_table",
  "arguments": {
    "file_path": "examples/Sample.java",
    "format_type": "full"
  }
}
```
>```json
>{
>  "table_output": "# Sample.java\n\n## Imports\n```java\njava.util.List\njava.util.ArrayList\n```\n\n## Classes\n| Class | Type | >Visibility | Lines | Methods | Fields |\n|-------|------|------------|-------|---------|--------|\n| AbstractParentClass | class | public | >7-15 | 2 | 0 |\n| ParentClass | class | public | 18-45 | 4 | 2 |\n| TestInterface | interface | public | 48-64 | 3 | 0 |\n| >AnotherInterface | interface | public | 67-69 | 1 | 0 |\n| Test | class | public | 72-159 | 14 | 3 |\n| InnerClass | class | public | >83-87 | 1 | 0 |\n| StaticNestedClass | class | public | 90-94 | 1 | 0 |\n| TestEnum | enum | public | 162-178 | 0 | 0 |\n\n## Fields\n| >Name | Type | Vis | Modifiers | Line | Doc |\n|------|------|-----|-----------|------|-----|\n| CONSTANT | String | ~ | static,final | 20 | >- |\n| parentField | String | # | protected | 23 | - |\n| value | int | - | private | 74 | - |\n| staticValue | int | + | public,static | >77 | - |\n| finalField | String | - | private,final | 80 | - |\n\n## Constructor\n| Method | Signature | Vis | Lines | Cols | Cx | Doc |\n|>--------|-----------|-----|-------|------|----|----|\n| ParentClass | ():void | + | 26-28 | 5-6 | 1 | - |\n| Test | (value:int):void | + | >97-100 | 5-6 | 1 | - |\n| Test | ():void | + | 103-105 | 5-6 | 1 | - |\n\n## Public Methods\n| Method | Signature | Vis | Lines | Cols | >Cx | Doc |\n|--------|-----------|-----|-------|------|----|----|\n| innerMethod | ():void | + | 84-86 | 5-6 | 1 | - |\n| nestedMethod | ()>:void | + | 91-93 | 5-6 | 1 | - |\n| getValue | ():String | + | 108-110 | 5-6 | 1 | - |\n| staticMethod | ():void [static] | + | 128-130 | >5-6 | 1 | - |\n| finalMethod | ():void | + | 133-135 | 5-6 | 1 | - |\n| doSomething | ():void | + | 138-141 | 5-6 | 1 | - |\n| >anotherMethod | ():void | + | 143-146 | 5-6 | 1 | - |\n| genericMethod | (input:T):void | + | 149-151 | 5-6 | 1 | - |\n| createList | >(item:T):List<T> | + | 154-158 | 5-6 | 1 | - |\n\n## Private Methods\n| Method | Signature | Vis | Lines | Cols | Cx | Doc |\n|--------|>-----------|-----|-------|------|----|----|\n| privateMethod | ():void | - | 123-125 | 5-6 | 1 | - |",
>  "format_type": "full",
>  "file_path": "examples/Sample.java",
>  "language": "java",
>  "metadata": {
>    "classes_count": 8,
>    "methods_count": 24,
>    "fields_count": 5,
>    "total_lines": 178
>  }
>}
>```


**Partial Code Reading:**
```json
{
  "tool": "read_code_partial",
  "arguments": {
    "file_path": "examples/Sample.java",
    "start_line": 84,
    "end_line": 86
  }
}
```
>```json
>{
>  "partial_content_result": "--- Partial Read Result ---\nFile: examples/Sample.java\nRange: Line 84-86\nCharacters read: 117\n{\n  \"file_path\": >\"examples/Sample.java\",\n  \"range\": {\n    \"start_line\": 84,\n    \"end_line\": 86,\n    \"start_column\": null,\n    \"end_column\": >null\n  },\n  \"content\": \"        public void innerMethod() {\\n            System.out.println(\\\"Inner class method, value: \\\" + >value);\\n        }\\n\",\n  \"content_length\": 117\n}"
>}


## Development

For developers and contributors:

```bash
# Clone the repository
git clone https://github.com/aimasteracc/tree-sitter-analyzer.git
cd tree-sitter-analyzer

# Install development dependencies
uv sync

# Run tests
pytest tests/ -v
```

## License

MIT License
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-analyzer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "\"aisheng.yu\" <aimasteracc@gmail.com>",
    "keywords": "ai-tools, ast, code-analysis, mcp, mcp-server, model-context-protocol, multi-language, parsing, static-analysis, tree-sitter",
    "author": null,
    "author_email": "\"aisheng.yu\" <aimasteracc@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0c/62/86095b908c2ffb292b76a3dbda963db1315e90c93dabce0e2d6098e629e9/tree_sitter_analyzer-0.1.3.tar.gz",
    "platform": null,
    "description": "# Tree-sitter Analyzer\n\n[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Tests](https://img.shields.io/badge/tests-1251%20passed-brightgreen.svg)](#\u6d4b\u8bd5)\n\nAn extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture, designed to solve the problem of large code files exceeding LLM single-pass token limits.\n\n**Available as both CLI tool and MCP server.**\n\n## Core Features\n\n1. **Code Scale Analysis** - Get overall structure without reading complete files\n2. **Targeted Code Extraction** - Extract specific line ranges efficiently  \n3. **Code Position Information** - Get detailed position data for precise extraction\n\n## Installation\n\n### Prerequisites\n\nFirst, install uv (a fast Python package manager):\n\n```bash\n# On macOS and Linux\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# On Windows\npowershell -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n\n# Or using pip\npip install uv\n```\n\n### Install from GitHub\n\n```bash\n# Basic installation with Java support\n# Clone and install the project\ngit clone https://github.com/aimasteracc/tree-sitter-analyzer.git\ncd tree-sitter-analyzer\n\n# Install with Java support\nuv sync\n\n# With popular languages (Java, Python, JavaScript, TypeScript)\nuv sync --extra popular\n\n# With MCP server support\nuv sync --extra mcp\n\n# Full installation with all features\nuv sync --extra all --extra mcp\n```\n\n## Usage\n\n### CLI Commands\n\n```bash\n# Code scale analysis\nuv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text\n\n# Partial code extraction\nuv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86\n\n# Position information table\nuv run python -m tree_sitter_analyzer examples/Sample.java --table=full\n```\n\n#### CLI Output Examples\n\n**Code Scale Analysis (`--advanced --output-format=text`):**\n\n>```\n>PS C:\\git-public\\tree-sitter-analyzer> uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text\n>2025-07-30 16:57:47,827 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python\n>2025-07-30 16:57:47,916 - tree_sitter_analyzer - INFO - CacheService initialized: L1=100, L2=1000, L3=10000, TTL=3600s\n>2025-07-30 16:57:47,917 - tree_sitter_analyzer - INFO - Loading plugins...\n>2025-07-30 16:57:47,920 - tree_sitter_analyzer - INFO - Plugin registered for language: java\n>2025-07-30 16:57:47,920 - tree_sitter_analyzer - INFO - Plugin registered for language: javascript\n>2025-07-30 16:57:47,922 - tree_sitter_analyzer - INFO - Plugin registered for language: python\n>2025-07-30 16:57:47,922 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python     \n>2025-07-30 16:57:47,923 - tree_sitter_analyzer - INFO - UnifiedAnalysisEngine initialized\n>INFO: Language auto-detected from extension: java\n>2025-07-30 16:57:47,925 - tree_sitter_analyzer - INFO - Starting analysis for examples/Sample.java\n>2025-07-30 16:57:47,945 - tree_sitter_analyzer.core.parser - INFO - Parser initialized successfully\n>2025-07-30 16:57:47,951 - PERF - analyze_java: 0.0253s - Operation completed\n>2025-07-30 16:57:47,951 - tree_sitter_analyzer.performance - INFO - analyze_java: 0.0253s - Operation completed\n>2025-07-30 16:57:47,958 - PERF - unified_analysis: 0.0253s - Analyzed examples/Sample.java (java)\n>2025-07-30 16:57:47,958 - tree_sitter_analyzer.performance - INFO - unified_analysis: 0.0253s - Analyzed examples/Sample.java (java)\n>\n>--- Advanced Analysis Results ---\n>\"File: examples/Sample.java\"\n>\"Package: (default)\"\n>\"Lines: 178\"\n>\"Classes: 8\"\n>\"Methods: 24\"\n>\"Fields: 5\"\n>\"Imports: 2\"\n>\"Annotations: 0\"\n>```\n\n**Partial Code Extraction (`--partial-read`):**\n>```\n>PS C:\\git-public\\tree-sitter-analyzer> uv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86\n>2025-07-30 16:58:22,948 - tree_sitter_analyzer - INFO - Successfully loaded 3 language plugins: java, javascript, python\n>2025-07-30 16:58:23,056 - tree_sitter_analyzer - INFO - Successfully read partial file examples/Sample.java: lines 84-86\n>{\n>  \"file_path\": \"examples/Sample.java\",\n>  \"range\": {\n>    \"start_line\": 84,\n>    \"end_line\": 86,\n>    \"start_column\": null,\n>    \"end_column\": null\n>  },\n>  \"content\": \"        public void innerMethod() {\\n            System.out.println(\\\"Inner class method, value: \\\" + value);\\n        }\\n\",\n>  \"content_length\": 117\n>}\n>```\n\n**Table Format Analysis (`--table=full`):**\n\nThe `--table=full` command produces detailed analysis tables:\n\n\n># Sample.java\n>\n>## Imports\n>```java\n>java.util.List\n>java.util.ArrayList\n>```\n>\n>## Classes\n>| Class | Type | Visibility | Lines | Methods | Fields |\n>|-------|------|------------|-------|---------|--------|\n>| AbstractParentClass | class | public | 7-15 | 2 | 0 |\n>| ParentClass | class | public | 18-45 | 4 | 2 |\n>| TestInterface | class | public | 48-64 | 3 | 0 |\n>| AnotherInterface | class | public | 67-69 | 1 | 0 |\n>| Test | class | public | 72-159 | 14 | 3 |\n>| InnerClass | class | public | 83-87 | 1 | 0 |\n>| StaticNestedClass | class | public | 90-94 | 1 | 0 |\n>| TestEnum | class | public | 162-178 | 0 | 0 |\n>\n>## Fields\n>| Name | Type | Vis | Modifiers | Line | Doc |\n>|------|------|-----|-----------|------|-----|\n>| CONSTANT | String | ~ | static,final | 20 | - |\n>| parentField | String | # | protected | 23 | - |\n>| value | int | - | private | 74 | - |\n>| staticValue | int | + | public,static | 77 | - |\n>| finalField | String | - | private,final | 80 | - |\n>\n>## Constructor\n>| Method | Signature | Vis | Lines | Cols | Cx | Doc |\n>|--------|-----------|-----|-------|------|----|----|\n>| ParentClass | ():void | + | 26-28 | 5-6 | 1 | - |\n>| Test | (value:int):void | + | 97-100 | 5-6 | 1 | - |\n>| Test | ():void | + | 103-105 | 5-6 | 1 | - |\n>\n>## Public Methods\n>| Method | Signature | Vis | Lines | Cols | Cx | Doc |\n>|--------|-----------|-----|-------|------|----|----|\n>| innerMethod | ():void | + | 84-86 | 5-6 | 1 | - |\n>| nestedMethod | ():void | + | 91-93 | 5-6 | 1 | - |\n>| getValue | ():String | + | 108-110 | 5-6 | 1 | - |\n>| staticMethod | ():void [static] | + | 128-130 | 5-6 | 1 | - |\n>| finalMethod | ():void | + | 133-135 | 5-6 | 1 | - |\n>| doSomething | ():void | + | 138-141 | 5-6 | 1 | - |\n>| anotherMethod | ():void | + | 143-146 | 5-6 | 1 | - |\n>| genericMethod | (input:T):void | + | 149-151 | 5-6 | 1 | - |\n>| createList | (item:T):List<T> | + | 154-158 | 5-6 | 1 | - |\n>\n>## Private Methods\n>| Method | Signature | Vis | Lines | Cols | Cx | Doc |\n>|--------|-----------|-----|-------|------|----|----|\n>| privateMethod | ():void | - | 123-125 | 5-6 | 1 | - |\n\n\n### MCP Server\n\nThe Tree-sitter Analyzer provides an MCP (Model Context Protocol) server that enables AI assistants to analyze code files directly.\n\n\n#### MCP Configuration\n\nAdd to your Claude Desktop config file:\n\n```json\n{\n  \"mcpServers\": {\n    \"tree-sitter-analyzer\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"run\", \n        \"--with\", \n        \"tree-sitter-analyzer[mcp]\",\n        \"python\", \n        \"-m\", \n        \"tree_sitter_analyzer.mcp.server\"\n      ]\n    }\n  }\n}\n```\n\n#### Available MCP Tools\n\n1. **analyze_code_scale** - Get code scale and complexity metrics\n2. **format_table** - Generate table-formatted analysis (equivalent to CLI `--table=full`)\n3. **read_code_partial** - Extract specific line ranges from files\n4. **analyze_code_universal** - Universal code analysis with automatic language detection\n\n#### MCP Usage Examples\n\n**Code Scale Analysis:**\n```json\n{\n  \"tool\": \"analyze_code_scale\",\n  \"arguments\": {\n    \"file_path\": \"examples/Sample.java\",\n    \"include_complexity\": true,\n    \"include_details\": true\n  }\n}\n```\n\n>```json\n>{\n>  \"file_path\": \"examples/Sample.java\",\n>  \"language\": \"java\",\n>  \"analyzer_type\": \"advanced\",\n>  \"analysis_type\": \"basic\",\n>  \"metrics\": {\n>    \"lines_total\": 178,\n>    \"lines_code\": 0,\n>    \"lines_comment\": 0,\n>    \"lines_blank\": 0,\n>    \"elements\": {\n>      \"classes\": 8,\n>      \"methods\": 24,\n>      \"fields\": 5,\n>      \"imports\": 2,\n>      \"annotations\": 0\n>    }\n>  }\n>}\n>```\n\n**Table Format Analysis:**\n```json\n{\n  \"tool\": \"format_table\",\n  \"arguments\": {\n    \"file_path\": \"examples/Sample.java\",\n    \"format_type\": \"full\"\n  }\n}\n```\n>```json\n>{\n>  \"table_output\": \"# Sample.java\\n\\n## Imports\\n```java\\njava.util.List\\njava.util.ArrayList\\n```\\n\\n## Classes\\n| Class | Type | >Visibility | Lines | Methods | Fields |\\n|-------|------|------------|-------|---------|--------|\\n| AbstractParentClass | class | public | >7-15 | 2 | 0 |\\n| ParentClass | class | public | 18-45 | 4 | 2 |\\n| TestInterface | interface | public | 48-64 | 3 | 0 |\\n| >AnotherInterface | interface | public | 67-69 | 1 | 0 |\\n| Test | class | public | 72-159 | 14 | 3 |\\n| InnerClass | class | public | >83-87 | 1 | 0 |\\n| StaticNestedClass | class | public | 90-94 | 1 | 0 |\\n| TestEnum | enum | public | 162-178 | 0 | 0 |\\n\\n## Fields\\n| >Name | Type | Vis | Modifiers | Line | Doc |\\n|------|------|-----|-----------|------|-----|\\n| CONSTANT | String | ~ | static,final | 20 | >- |\\n| parentField | String | # | protected | 23 | - |\\n| value | int | - | private | 74 | - |\\n| staticValue | int | + | public,static | >77 | - |\\n| finalField | String | - | private,final | 80 | - |\\n\\n## Constructor\\n| Method | Signature | Vis | Lines | Cols | Cx | Doc |\\n|>--------|-----------|-----|-------|------|----|----|\\n| ParentClass | ():void | + | 26-28 | 5-6 | 1 | - |\\n| Test | (value:int):void | + | >97-100 | 5-6 | 1 | - |\\n| Test | ():void | + | 103-105 | 5-6 | 1 | - |\\n\\n## Public Methods\\n| Method | Signature | Vis | Lines | Cols | >Cx | Doc |\\n|--------|-----------|-----|-------|------|----|----|\\n| innerMethod | ():void | + | 84-86 | 5-6 | 1 | - |\\n| nestedMethod | ()>:void | + | 91-93 | 5-6 | 1 | - |\\n| getValue | ():String | + | 108-110 | 5-6 | 1 | - |\\n| staticMethod | ():void [static] | + | 128-130 | >5-6 | 1 | - |\\n| finalMethod | ():void | + | 133-135 | 5-6 | 1 | - |\\n| doSomething | ():void | + | 138-141 | 5-6 | 1 | - |\\n| >anotherMethod | ():void | + | 143-146 | 5-6 | 1 | - |\\n| genericMethod | (input:T):void | + | 149-151 | 5-6 | 1 | - |\\n| createList | >(item:T):List<T> | + | 154-158 | 5-6 | 1 | - |\\n\\n## Private Methods\\n| Method | Signature | Vis | Lines | Cols | Cx | Doc |\\n|--------|>-----------|-----|-------|------|----|----|\\n| privateMethod | ():void | - | 123-125 | 5-6 | 1 | - |\",\n>  \"format_type\": \"full\",\n>  \"file_path\": \"examples/Sample.java\",\n>  \"language\": \"java\",\n>  \"metadata\": {\n>    \"classes_count\": 8,\n>    \"methods_count\": 24,\n>    \"fields_count\": 5,\n>    \"total_lines\": 178\n>  }\n>}\n>```\n\n\n**Partial Code Reading:**\n```json\n{\n  \"tool\": \"read_code_partial\",\n  \"arguments\": {\n    \"file_path\": \"examples/Sample.java\",\n    \"start_line\": 84,\n    \"end_line\": 86\n  }\n}\n```\n>```json\n>{\n>  \"partial_content_result\": \"--- Partial Read Result ---\\nFile: examples/Sample.java\\nRange: Line 84-86\\nCharacters read: 117\\n{\\n  \\\"file_path\\\": >\\\"examples/Sample.java\\\",\\n  \\\"range\\\": {\\n    \\\"start_line\\\": 84,\\n    \\\"end_line\\\": 86,\\n    \\\"start_column\\\": null,\\n    \\\"end_column\\\": >null\\n  },\\n  \\\"content\\\": \\\"        public void innerMethod() {\\\\n            System.out.println(\\\\\\\"Inner class method, value: \\\\\\\" + >value);\\\\n        }\\\\n\\\",\\n  \\\"content_length\\\": 117\\n}\"\n>}\n\n\n## Development\n\nFor developers and contributors:\n\n```bash\n# Clone the repository\ngit clone https://github.com/aimasteracc/tree-sitter-analyzer.git\ncd tree-sitter-analyzer\n\n# Install development dependencies\nuv sync\n\n# Run tests\npytest tests/ -v\n```\n\n## License\n\nMIT License",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture",
    "version": "0.1.3",
    "project_urls": {
        "Bug Reports": "https://github.com/aimasteracc/tree-sitter-analyzer/issues",
        "Changelog": "https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/aimasteracc/tree-sitter-analyzer#readme",
        "Homepage": "https://github.com/aimasteracc/tree-sitter-analyzer",
        "Issues": "https://github.com/aimasteracc/tree-sitter-analyzer/issues",
        "Repository": "https://github.com/aimasteracc/tree-sitter-analyzer.git",
        "Source Code": "https://github.com/aimasteracc/tree-sitter-analyzer"
    },
    "split_keywords": [
        "ai-tools",
        " ast",
        " code-analysis",
        " mcp",
        " mcp-server",
        " model-context-protocol",
        " multi-language",
        " parsing",
        " static-analysis",
        " tree-sitter"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f57fd32fd2be188a87c238d269c1193a0aa409de1c5a22d3cd0136fb9375456f",
                "md5": "35d2a4dbed593aeb16c8d29e30afb7b1",
                "sha256": "5364b378d481eacf0dca480bd1b5337639e0f16530008ab07f402a5a4a0eeaef"
            },
            "downloads": -1,
            "filename": "tree_sitter_analyzer-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35d2a4dbed593aeb16c8d29e30afb7b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 185743,
            "upload_time": "2025-07-31T03:56:54",
            "upload_time_iso_8601": "2025-07-31T03:56:54.534678Z",
            "url": "https://files.pythonhosted.org/packages/f5/7f/d32fd2be188a87c238d269c1193a0aa409de1c5a22d3cd0136fb9375456f/tree_sitter_analyzer-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0c6286095b908c2ffb292b76a3dbda963db1315e90c93dabce0e2d6098e629e9",
                "md5": "0a1b43d244f3eb8d539719ea9ec88a9e",
                "sha256": "480373d58a7fdf4ec412502eeba9a0abc70b30c79293e9e9a58f8d9c6d5838c0"
            },
            "downloads": -1,
            "filename": "tree_sitter_analyzer-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0a1b43d244f3eb8d539719ea9ec88a9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 246976,
            "upload_time": "2025-07-31T03:56:56",
            "upload_time_iso_8601": "2025-07-31T03:56:56.336584Z",
            "url": "https://files.pythonhosted.org/packages/0c/62/86095b908c2ffb292b76a3dbda963db1315e90c93dabce0e2d6098e629e9/tree_sitter_analyzer-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-31 03:56:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aimasteracc",
    "github_project": "tree-sitter-analyzer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tree-sitter-analyzer"
}
        
Elapsed time: 0.72584s