post_v1_code_index
(re)indexes a repository for the caller's org, incrementally: files whose content hash is unchanged are skipped, so re-sending a whole tree is cheap.
(re)indexes a repository for the caller's org, incrementally: files whose
content hash is unchanged are skipped, so re-sending a whole tree is cheap.
Each file is parsed for symbols, split at AST boundaries and — when the
semantic tier is available — embedded, which is what makes it searchable across
all three retrieval tiers. Pass prune to also DELETE indexed files absent
from the request, which turns the call into a full sync; without it the call is
an upsert. The index is written to the caller org's own physically separate
database.
| Tool | post_v1_code_index |
| Door | https://api.hanzo.ai/v1/mcp |
| Method | tools/call (JSON-RPC 2.0) |
| Arguments | 3 |
| Operation | POST /v1/code/index |
| Product | code |
Arguments
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
files | fileInput[] | — | — | Files is the full set of files to index. Required and non-empty; max 20000 files, 1 MiB per file and 1 GiB in total. Unchanged files are skipped by content hash, so re-sending the whole tree is cheap. |
prune | boolean | — | — | Prune deletes indexed files that are NOT in this request — which makes the call a full sync of the repo rather than an upsert. Only pass it when Files is the complete tree. |
repo | string | — | — | Repo is the repository label to index under. Required, max 200 bytes. It is a stored column value, not a filesystem path. |
This tool's schema does not declare which fields are required, nor any default, nor any enumerated value set. The columns above are empty because the door publishes nothing there, not because the answer is "none" — where a field is constrained, the constraint is stated in that field's own description.
Object types
fileInput are objects this tool's fields refer to. Each is declared inside the tool's own schema.
fileInput
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | — | — | Content is the file's full text. Max 1 MiB per file; binary files should simply be omitted rather than sent. |
path | string | — | — | Path is the file's repo-relative path, e.g. "internal/store/db.go". |
Call it
A tools/call carries every argument in one flat object — nothing binds to a path or a query string. Every declared argument is shown, because the door marks none of them required.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "post_v1_code_index",
"arguments": {
"files": [
{}
],
"prune": false,
"repo": "<repo>"
}
}
}'Values are placeholders derived from each field's declared type. tools/list needs no credential; tools/call does — called without one the door answers HTTP 200 with a JSON-RPC result whose isError is set and whose text says what was missing. How to get a key →
The operation behind it
| Operation | Route | Product | Summary |
|---|---|---|---|
cloud_post_v1_code_index | POST /v1/code/index | code | (re)indexes a repository for the caller's org, incrementally: files whose content hash is |
The same capability over plain HTTP is in the code API reference, on https://api.hanzo.ai.
All 834 tools · The door · API reference
Generated from tools/list on https://api.hanzo.ai/v1/mcp — 834 tools captured 2026-08-01 (this build read the vendored copy; the door was unreachable).
How is this guide?