Find potentially dead functions, components and hooks in an indexed codebase.
A function is considered "dead" when:
- Nothing else calls, tests or references it by value (no incoming CALLS, TESTS or REFERENCES edges)
- It is not a test function, route handler, or dunder method
- It has no entry-point decorators (route, click, celery, etc.)
CODE-INDEXER-HARDEN-1 U6 opt-in options (both default false, so existing callers get the same results):
include_exported also reports exported functions, and production_only counts only callers in non-test
files. The response echoes the effective options under options.
Returns a list of potentially unused callable entities sorted by file path.
Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).
In: header
Query Parameters
Repository name to scan
Comma-separated additional decorator names to exclude (e.g. 'celery,dramatiq')
Max results
Also report exported functions with no counted caller (entry points, unknown reachability, live class members and TS interface/enum stay excluded)
Only callers in non-test files count: drop TESTS edges and edges from entities in test files (files that define a parser-classified test)
Response Body
application/json
application/json
curl -X GET "https://example.com/memory/code/dead-code?repo=string"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}