SmartMemory
GET
/memory/code/dead-code

Find potentially dead (unreferenced) functions in an indexed codebase.

A function is considered "dead" when:

  • No other function calls it (no incoming CALLS edges)
  • It is not a test function, route handler, or dunder method
  • It has no entry-point decorators (route, click, celery, etc.)

Returns a list of potentially unused functions sorted by file path.

Query Parameters

repo*Repo

Repository name to scan

exclude_decorators?|

Comma-separated additional decorator names to exclude (e.g. 'celery,dramatiq')

limit?Limit

Max results

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": {}
    }
  ]
}