Tools Overview
The complete set of MCP tools Clean exposes to your agent — identical in the local and cloud editions.
Once Clean is connected, your agent gains a set of MCP tools for searching, reading, and managing indexed code. The same tools are available in both the local open-source edition and the cloud — the only difference is where indexing runs.
The local edition exposes all eight tools below. The cloud dashboard manages indexing and repos for you, so on cloud setups your agent primarily uses the read/search tools (search_code, expand_result, get_source, get_file_tree, list_repos). The indexing tools (index_repo, delete_repo) operate on whichever backend you're connected to.
All tools
| Tool | Key inputs | What it does |
|---|---|---|
search_code | query, optional repo, branch, cwd, top_k, depth | Semantic search across indexed code, returning source, callers/callees, and neighbouring functions. |
expand_result | rank | Get full source for a truncated result from the last search_code call in the same session. |
get_source | file, optional repo, branch, start_line, end_line, function | Read a file or an exact indexed function from an indexed repo. |
get_file_tree | optional repo, branch, depth, include_hidden | Print the directory tree of an indexed repo. |
index_repo | path or repo, optional branch, force, background, timeout | Index a local folder or clone + index a GitHub repo. |
list_repos | none | Show every indexed repository with branch, status, entity count, and detected metadata. |
delete_repo | repo, optional branch, remove_files | Remove an index, its metadata record, and optionally cloned source files. |
get_token_savings | optional reset | Show or reset TOON-format token savings for the current server session. |
A typical flow
list_repos— see what's indexed and ready.get_file_tree— understand the project layout (optional).search_code— find the functions that matter by behaviour.expand_result— pull the full source of the result you care about.get_source— read any other file or exact function on demand.
Why the tools are shaped this way
Every tool is designed to spend as few of your agent's context tokens as possible: search returns tiered summaries rather than full source, expansion is on demand, and reads are capped. See How Clean reduces cost for the full breakdown.