mcp-server-tree-sitter
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_TS_LOG_LEVEL | No | Logging level (DEBUG, INFO, WARNING, ERROR). | INFO |
| MCP_TS_CONFIG_PATH | No | Path to the YAML configuration file. | |
| MCP_TS_CACHE_MAX_SIZE_MB | No | Maximum cache size in MB. | 100 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| configureC | Configure the server. |
| register_project_toolC | Register a project directory for code exploration. |
| list_projects_toolC | List all registered projects. |
| remove_project_toolC | Remove a registered project. |
| list_languagesC | List available languages. |
| check_language_availableC | Check if a tree-sitter language parser is available. |
| list_filesB | List files in a project. |
| get_fileB | Get content of a file. |
| get_file_metadataC | Get metadata for a file. |
| get_astA | Get abstract syntax tree for a file. |
| get_node_at_positionA | Find the AST node at a specific position. |
| find_textB | Search for text pattern in project files. |
| run_queryA | Run a tree-sitter query on project files. |
| get_query_template_toolC | Get a predefined tree-sitter query template. |
| list_query_templates_toolC | List available query templates. |
| build_queryC | Build a tree-sitter query from templates or patterns. |
| adapt_queryC | Adapt a query from one language to another. |
| get_node_typesB | Get descriptions of common node types for a language. |
| get_symbolsC | Extract symbols from a file. |
| analyze_projectC | Analyze overall project structure. |
| get_dependenciesB | Find dependencies of a file. |
| analyze_complexityC | Analyze code complexity. |
| find_similar_codeC | Find similar code to a snippet. |
| find_usageC | Find usage of a symbol. |
| clear_cacheC | Clear the parse tree cache. |
| diagnose_configC | Diagnose issues with YAML configuration loading. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| code_review | Create a prompt for reviewing a code file |
| explain_code | Create a prompt for explaining a code file |
| explain_tree_sitter_query | Create a prompt explaining tree-sitter query syntax |
| suggest_improvements | Create a prompt for suggesting code improvements |
| project_overview | Create a prompt for a project overview analysis |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 26 tools
Most tools have distinct purposes, but some overlap exists. For example, 'find_text' and 'run_query' both search for patterns, though one uses text matching and the other uses tree-sitter queries. Similarly, 'analyze_complexity' and 'analyze_project' both analyze code but at different scopes. Descriptions help clarify boundaries, but an agent might occasionally hesitate between these pairs.
Naming is mixed with no clear pattern. Some tools use verb_noun (e.g., 'clear_cache', 'build_query'), others use noun_verb (e.g., 'list_files', 'list_projects_tool'), and some are ambiguous (e.g., 'configure', 'diagnose_config'). There's inconsistency in suffix usage, like 'list_projects_tool' vs. 'register_project_tool', which disrupts predictability. However, names are generally readable despite the lack of a uniform convention.
With 26 tools, the count feels heavy for a tree-sitter server, bordering on excessive. While the domain of code analysis and querying is broad, many tools could be consolidated (e.g., 'get_file' and 'get_file_metadata'). It's not extreme, but the number may overwhelm agents and suggests over-specialization rather than a well-scoped set.
The tool set comprehensively covers the tree-sitter and code analysis domain. It includes project management (register, list, remove), file operations (get, list, metadata), AST and query tools (get_ast, run_query, build_query), analysis (complexity, dependencies, symbols), and utilities (cache, configuration). There are no obvious gaps; agents can perform full workflows from setup to detailed code exploration.