Tree-Sitter Language Pack
v1.28.0Parse source code, extract structure and symbols, and chunk files for LLMs across 300+ languages.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
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.
| Parameter | Type | Description |
|---|---|---|
content | string | null | Source content used for content-based detection. |
path | string | null | File path or name used for extension-based detection. |
download
Download parser libraries from the remote registry. Pass languages list, groups, or all=true. Set fresh=true to clean the cache first.
| Parameter | Type | Description |
|---|---|---|
all | boolean | null | Download all available languages. |
fresh | boolean | null | Clean the cache before downloading for a fresh fetch. Default: false. |
groups | array | null | Named groups to download. The manifest currently defines exactly one group, `"all"`; call `manifest_groups` to enumerate the names that actually exist. |
languages | array | null | Specific language names to download. |
info
Show whether a language is known, downloaded, and its cache path.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language name to inspect. |
list_languages
List languages. source: 'available' (default), 'downloaded', or 'manifest'. Optional substring filter.
| Parameter | Type | Description |
|---|---|---|
filter | string | null | Optional substring filter applied to the result. |
source | string | null | Which set to query: `"available"` (default), `"downloaded"`, or `"manifest"`. |
parse
Parse source code with a tree-sitter grammar. Returns the syntax tree as sexp or JSON.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language name (e.g. `"python"`). Required. |
source * | string | Source code to parse. |
format | string | null | Output format: `"sexp"` (default) or `"json"`. |
process
Run the code-intelligence pipeline on source code. Extracts structure, imports, exports, symbols, and more.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language name (e.g. `"rust"`). Required. |
source * | string | Source code to analyse. |
all | boolean | null | Enable every analysis feature. Overrides the individual flags below when true. |
chunk_max_size | integer | null | Maximum chunk size in bytes (`None` disables chunking). |
comments | boolean | null | Extract comments. Default: false. |
data_extraction | boolean | null | Enable hierarchical data extraction for data-format files. Default: false. |
diagnostics | boolean | null | Include parse diagnostics. Default: false. |
docstrings | boolean | null | Extract docstrings. Default: false. |
exports | boolean | null | Extract export statements. Default: true. |
imports | boolean | null | Extract import statements. Default: true. |
structure | boolean | null | Extract structural items (functions, classes). Default: true. |
symbols | boolean | null | Extract symbol definitions. Default: false. |