Codicil.MCP.Tools.ListFunctionCallers (Codicil v0.7.1)

View Source

List all functions that call a specific target function. Analyzes the call graph to show dependencies.

Use this tool when:

  • Assessing refactoring impact (which code will be affected by changes)
  • Understanding where a function is used in the codebase
  • Tracing execution flow during debugging

Examples:

  • Find callers of User.create/1 before modifying its signature
  • Identify all code that depends on a helper function before removing it
  • Trace which routes call a specific controller action

Returns: List of caller functions with module, name, arity, and file location.

Summary

Functions

Find all functions that call the specified target function.

Functions

call(map)

Find all functions that call the specified target function.

Parameters

  • functionName - Name of the target function
  • moduleName - Module name (e.g., "MyModule" or ":gen_server")
  • arity - Function arity

Returns

  • {:ok, text} with formatted list of callers
  • {:error, reason} if function not found