get_class_methods_by_class_full_name
Retrieve all methods of a specified class using its fully qualified name, returning their full names, names, signatures, and IDs. Integrates with the Joern MCP Server for code review and security analysis.
Instructions
Get the methods of a class by its fully qualified name
@param class_full_name: The fully qualified name of the class
@return: List of full name, name, signature and id of methods in the class
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| class_full_name | Yes |
Implementation Reference
- server_tools.py:67-75 (handler)The handler function for the 'get_class_methods_by_class_full_name' tool. It takes the class full name, sends a formatted query to the Joern server using joern_remote, and returns the extracted list of method names.@joern_mcp.tool() def get_class_methods_by_class_full_name(class_full_name:str) -> list[str]: """Get the methods of a class by its fully qualified name @param class_full_name: The fully qualified name of the class @return: List of full name, name, signature and id of methods in the class """ response = joern_remote(f'get_class_methods_by_class_full_name("{class_full_name}")') return extract_list(response)
- server.py:95-106 (registration)Dynamically loads and executes server_tools.py, which registers the tool via the @joern_mcp.tool() decorator on the handler function.GENERATED_PY = os.path.join(SCRIPT_DIR, "server_tools.py") def generate(): """Generate and execute additional server tools from server_tools.py file. This function reads the content of server_tools.py and executes it to add more functionality to the server. """ with open(GENERATED_PY, "r") as f: code = f.read() exec(compile(code, GENERATED_PY, "exec")) generate()