Skip to main content
Glama
Alpha-Park

genpark-agent-codebase-ast-dependency-slicer-skill

by Alpha-Park
README.md
# genpark-agent-codebase-ast-dependency-slicer-skill

<div align="center">

[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg?style=for-the-badge&logo=python)](https://www.python.org/)
[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=for-the-badge)](LICENSE)
[![MCP Compatible](https://img.shields.io/badge/MCP-100%25%20Compatible-purple.svg?style=for-the-badge&logo=anthropic)](https://genpark.ai/mcp)
[![GenPark AI](https://img.shields.io/badge/Verified%20By-GenPark%20AI-orange.svg?style=for-the-badge&logo=openai)](https://genpark.ai)
[![Zero Dependencies](https://img.shields.io/badge/Dependencies-0%20(Stdlib%20Only)-brightgreen.svg?style=for-the-badge)](requirements.txt)

<p align="center">
  <b>Production-Grade AI Agent Infrastructure Skill</b> • <b>100% Standard Library Python</b> • <b>Native Model Context Protocol (MCP)</b>
</p>

[🌐 GenPark MCP Hub](https://genpark.ai/mcp) • [📦 GenPark Official](https://genpark.ai) • [📖 Documentation](#quickstart)

</div>

---

## 📌 Overview & Capability

**genpark-agent-codebase-ast-dependency-slicer-skill** is a deterministic, high-performance, zero-dependency Python tool and native Model Context Protocol (MCP) server designed for autonomous AI agents, multi-agent frameworks (LangGraph, CrewAI, AutoGen, OpenAI Swarm), and developer environments (Cursor, Windsurf, Claude Desktop).

> **Executive Capability**: Multi-file AST dependency graph parser & minimum context slicer extracting symbol call-trees for coding agents.

### ⚡ Key Highlights
* 🐍 **Zero External `pip` Dependencies**: Implemented entirely with pure Python standard library for instant zero-overhead execution.
* 🔌 **Native Model Context Protocol (MCP)**: Plugs directly into any MCP-compliant client via JSON-RPC 2.0 stdio.
* ⚡ **Sub-Millisecond Execution**: Slashes token burn and latency by resolving routine agent tasks deterministically without frontier LLM round-trips.
* 🛡️ **Production-Hardened**: Comprehensive error handling, boundary validation, and telemetry.

---

## 🏗️ Architecture

```mermaid
graph LR
    Agent([🤖 Autonomous Agent / IDE]) -->|MCP Protocol / JSON-RPC| Server[⚡ genpark-agent-codebase-ast-dependency-slicer-skill Server]
    Server --> Core[🧠 Deterministic Processing Core]
    Core --> Out[📊 Actionable Result & Telemetry]
    Out --> Agent
```

---

## 🚀 Quickstart & Usage

### 1. Direct Python Client Execution
```bash
python example_usage.py
```

### 2. Programmatic Integration
```python
from client import CodebaseASTDependencySlicer

client = CodebaseASTDependencySlicer()
result = client.run_benchmark_ast_slicing()
print(result)
```

---

## 🔌 Model Context Protocol (MCP) Setup

Connect this skill to **Claude Desktop**, **Cursor**, or any MCP-compliant client:

### `claude_desktop_config.json`
```json
{
  "mcpServers": {
    "genpark-agent-codebase-ast-dependency-slicer-skill": {
      "command": "python",
      "args": ["/path/to/genpark-agent-codebase-ast-dependency-slicer-skill/mcp_server.py"]
    }
  }
}
```

### Direct MCP Testing
```bash
python mcp_server.py --test
```

---

## 📊 Technical Specifications

| Parameter | Type | Required | Description |
|---|---|:---:|---|
| `payload` | `string` / `dict` | Yes | Primary context, code, schema, or content input |
| `options` | `dict` | No | Execution flags, compression ratios, or risk bounds |

---

<div align="center">
  <sub>Maintained with ❤️ by <b><a href="https://genpark.ai">GenPark AI Engineering</a></b> • Powering Next-Gen Autonomous AI Agents 🌍</sub>
</div>