tree-sitter-language-pack MCP 参考文档
mcp
使用 tree-sitter-language-pack 的 MCP 参考文档。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 485
- Forks
- 71
01 前言 Front Matter
- name
- mcp
- description
- Use tree-sitter-language-pack mcp reference documentation.
02 资源文件 1
- 参考文档prompt.md5.6 KB
03 SKILL.md 正文
<!-- This file is auto-generated by alef — DO NOT EDIT. --> <!-- alef:hash:0d9d6e5ae7656e342db4c129d1eabd1ecab3e24a92346809cf7c5ddf850c2f85 --> <!-- To regenerate: alef docs --> <!-- To verify freshness: alef verify -->
tree-sitter-language-pack MCP Reference
Use this skill when integrating tree-sitter-language-pack through Model Context Protocol tools, prompts, or resources.
cache_dir: Return the effective parser cache directory path.clean_cache: Delete all cached parser libraries from the cache directory.detect_language: Detect the language for a file path or source content. Returns the detected language name.download: Download parser libraries from the remote registry. Pass languages list, groups, or all=true. Set fresh=true to clean the cache first.info: Show whether a language is known, downloaded, and its cache path.list_languages: List languages. source: 'available' (default), 'downloaded', or 'manifest'. Optional substring filter.parse: Parse source code with a tree-sitter grammar. Returns the syntax tree as sexp or JSON.process: Run the code-intelligence pipeline on source code. Extracts structure, imports, exports, symbols, and more.
04 同仓库更多 Skills
tree-sitter 代码智能解析
tree-sitter-language-pack
使用 tree-sitter 语法从 371 种编程语言中解析并提取代码智能信息。适用于编写解析源代码、提取结构/导入/导出/符号/文档字符串/注释、检测语言、运行语法诊断或为大模型(LLM)生成语法感知分块的代码——支持 Rust、Python、Node.js/TypeScript 或 ts-pack CLI。涵盖安装、CLI 接口、SDK 接口以及解析器缓存管理。
tree-sitter MCP 服务使用
tree-sitter-language-pack-using-the-mcp-server
当需要通过 tree-sitter-language-pack 的 MCP 服务器工具来解析源代码、提取代码结构或检测语言(而非调用 ts-pack CLI)时使用。涵盖工具接口、自动安装启动器,以及 MCP 相较于 CLI 或 SDK 的优势场景。
源代码语法树解析
tree-sitter-language-pack-parsing-source
当用户需要为源文件生成 tree-sitter 语法树时使用——以 s-表达式转储或 JSON 树的形式呈现。涵盖 `ts-pack parse`、语言自动检测与 `--language` 的对比、标准输入(stdin)输入以及读取 `has_errors`。
解析器缓存管理
tree-sitter-language-pack-managing-parsers
当用户需要管理 tree-sitter 解析器缓存时使用——为离线或 CI 运行预取解析器、列出已下载内容、检查某种语言、查找缓存目录或清理缓存。涵盖 `ts-pack download`、`list`、`info`、`cache-dir`、`clean` 和 `init`。
代码结构提取
tree-sitter-language-pack-extracting-code-structure
当用户需要从源文件获取结构化代码元数据时使用——包括函数、类、导入、导出、符号、文档字符串、注释或语法诊断。涵盖 `ts-pack process` 的功能开关、JSON 结果结构以及默认功能集。
编程语言检测
tree-sitter-language-pack-detecting-languages
当用户想知道某个文件或代码片段属于哪种编程语言时使用。涵盖 `ts-pack parse`/`process` 中的隐式检测、通过 `ts-pack list`/`info` 确认是否支持某种语言,以及用于路径、扩展名和原始内容的 SDK 检测函数。