Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TREE_SITTER_MCP_ROOTSNoWorkspace roots for path confinement. If unset, uses host-advertised roots or nearest project markers.
TREE_SITTER_MCP_ALLOW_UNCONFINEDNoSet to '1' to allow paths with no project marker to be accessed.

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

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_definitionsA

List definitions (classes, functions, methods, fields, structs...) in a source file with name, kind and line ranges. Structural alternative to reading the whole file.

read_definitionA

Read the source code of one definition (method/class/function...) by exact name from a source file. Overloads and same-named definitions are all returned with line numbers.

ast_searchA

Run a tree-sitter query (S-expression pattern) against a source file and return captures with line numbers. Use for AST-shaped matching that Grep cannot express.

index_workspaceA

Parse all supported source files under a directory into a persisted symbol index (definitions + identifier occurrences + call sites), backed by SQLite when available (JSON fallback). Run once before find_references / go_to_definition. Indexes are kept per root: indexing a new root adds a second index instead of replacing the existing one.

delete_indexA

Drop a workspace symbol index built by index_workspace: removes it from the current session and deletes its persisted cache files (SQLite db / JSON) so the next index_workspace rebuilds from scratch. Omit root when exactly one index exists; with several indexes you must pass root. Non-destructive to source files — only cache is removed.

find_referencesA

Occurrences of an identifier across the indexed workspace, marking definition sites. References are classified with confidence tiers: exact (import-resolved or local), likely (same-dir or unique name), name (fallback). If the index for root does not exist yet it is built automatically (first call may be slow).

go_to_definitionA

Definition sites of a name across the indexed workspace, nearest to the optional file first. If the index for root does not exist yet it is built automatically (first call may be slow).

index_statusA

Report current workspace index state: root, version, totals, watcher active, pending dirty paths. Without root, reports the most recently built index plus all available roots.

list_presetsB

List built-in and user-provided audit query presets per language (eval/exec, subprocess shell, innerHTML, System.exit, os/exec...).

preset_searchA

Run a named preset (see list_presets) against a source file and return capture hits with line numbers.

get_node_typesA

List named node types, anonymous tokens and field names for a language's grammar — use it to write correct ast_search query patterns without trial and error.

analyze_complexityA

Approximate cyclomatic complexity (1 + decision points: if/loops/case/catch/&&/||/ternary) per function in a source file, worst first.

callersA

Heuristic (name-based) call sites of a function in the indexed workspace: each hit gives file, line, language, enclosing caller function and receiver object, plus a confidence tier (exact when the receiver's declared type or an import resolves the callee, likely for same-dir/unique names, name as fallback). Same-named methods of different classes are mixed in one result; filter by resolved_to for a precise call graph. Accepts optional file/language filters. If the index for root does not exist yet it is built automatically.

calleesA

Heuristic (name-based) call sites inside a function's body, grouped per callee name, with file, language, receiver object and a confidence tier (exact/likely/name) for the callee resolution. Same-named callees of different classes are grouped under one name; use the resolved_to fields to disambiguate. Accepts optional file/language filters. If the index for root does not exist yet it is built automatically.

resolution_statsA

Aggregate resolution statistics over the indexed workspace: share of call sites resolved at each confidence tier (exact/likely/name), how import names resolve, and how many names are defined in several files. Use it to measure, not assert, how well cross-file navigation works on a given codebase.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhaoxingxing06/kimi-tree-lens'

If you have feedback or need assistance with the MCP directory API, please join our Discord server