API Reference
API Reference
Complete reference for kit-dev-mcp tools and responses
Repository Operations
open_repository
Parameters
{ "path": string, // Required: local path or GitHub URL "github_token": string, // Optional: for private repos "ref": string // Optional: branch/tag/commit }
Returns
{ "repo_id": string, "path": string, "type": "local" | "github", "file_count": number, "language_stats": { "Python": 45.2, "JavaScript": 30.1, ... } }
get_file_tree
Parameters
{ "repo_id": string, // Required: repository identifier "path": string, // Optional: subdirectory path "max_depth": number // Optional: tree depth limit }
Returns
[ { "path": "src/main.py", "type": "file", "size": 2048, "last_modified": "2024-01-15T10:30:00Z" }, { "path": "src/utils", "type": "directory", "children": [...] } ]
Documentation Research
deep_research_package
Parameters
{ "package_name": string, // Required: package to research "max_sources": number // Optional: max sources to fetch }
Returns
{ "package": "react", "sources_found": 8, "quality_score": 0.92, "documentation": { "overview": "React is a JavaScript library...", "installation": "npm install react", "api_reference": {...}, "examples": [...], "best_practices": [...] }, "sources": [ { "type": "official", "url": "https://react.dev", "reliability": 1.0 } ], "output_file": "/path/to/cache/react_docs.json" }
Code Intelligence
extract_symbols
Parameters
{ "repo_id": string, // Required "file_path": string, // Required "symbol_type": string // Optional: "function" | "class" | "all" }
Returns
{ "symbols": [ { "name": "authenticate", "type": "function", "line": 15, "docstring": "Authenticate user credentials", "parameters": ["username", "password"], "returns": "User | None" }, { "name": "User", "type": "class", "line": 5, "docstring": "User model class", "methods": ["__init__", "validate", "save"], "attributes": ["id", "username", "email"] } ], "imports": [ "from datetime import datetime", "import jwt" ], "metrics": { "complexity": 5, "lines_of_code": 150 } }
Search Operations
grep_ast
Parameters
{ "repo_id": string, // Required: repository identifier "pattern": string, // Required: AST pattern to search "file_pattern": string, // Optional: glob pattern for files "language": string // Optional: programming language }
Returns
{ "matches": [ { "file": "src/main.py", "line": 42, "text": "async def handle_request(req):", "match_type": "async_function_def" } ], "total_matches": 15, "files_searched": 120 }
search_code
Parameters
{ "repo_id": string, // Required: repository identifier "pattern": string, // Required: regex pattern "max_results": number, // Optional: limit results "case_sensitive": boolean // Optional: case sensitivity }
Error Responses
All tools return standardized error responses:
{ "error": { "code": "REPOSITORY_NOT_FOUND", "message": "Repository with ID 'repo_123' not found", "details": { "repo_id": "repo_123", "available_repos": ["repo_456", "repo_789"] } } }
Common Error Codes
REPOSITORY_NOT_FOUND
- Repository doesn't existFILE_NOT_FOUND
- File doesn't exist in repositoryINVALID_PARAMETERS
- Missing or invalid parametersPERMISSION_DENIED
- No access to resourceRATE_LIMITED
- API rate limit exceededTIMEOUT
- Operation timed out