get_call_code_by_id
Retrieve the source code of a specific call node by its unique ID from the loaded CPG using the MCP server for code review and analysis.
Instructions
Get the source code of a specific call node from the loaded CPG by the call id
@param id: The unique identifier of the call node, the id is a Long int string, like '111669149702L'
@return: The source code of the specified call
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code_id | Yes |
Implementation Reference
- server_tools.py:108-116 (handler)The handler function for the 'get_call_code_by_id' tool. It takes a code_id parameter, sends a remote query to the Joern server, and returns the extracted source code of the call node.@joern_mcp.tool() def get_call_code_by_id(code_id:str) -> str: """Get the source code of a specific call node from the loaded CPG by the call id @param id: The unique identifier of the call node, the id is a Long int string, like '111669149702L' @return: The source code of the specified call """ response = joern_remote(f'get_call_code_by_id("{code_id}")') return extract_value(response)