Skip to main content
Glama

get_method_code_by_full_name

Retrieve source code for specific methods using their fully qualified names to support code review and security analysis workflows.

Instructions

Get the code of a method by its fully name, If you know the full name of the method, you can use this tool to get the method code directly. If you only know the full name of the class and the name of the method, you should use get_method_code_by_class_full_name_and_method_name @param method_full_name: The fully qualified name of the method (e.g., com.android.nfc.NfcService$6.onReceive:void(android.content.Context,android.content.Intent)) @return: The source code of the specified method

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
method_full_nameYes

Implementation Reference

  • Handler function for the 'get_method_code_by_full_name' tool. It queries the Joern server via joern_remote and extracts the method source code using extract_value.
    def get_method_code_by_full_name(method_full_name:str) -> str: """Get the code of a method by its fully name, If you know the full name of the method, you can use this tool to get the method code directly. If you only know the full name of the class and the name of the method, you should use get_method_code_by_class_full_name_and_method_name @param method_full_name: The fully qualified name of the method (e.g., com.android.nfc.NfcService$6.onReceive:void(android.content.Context,android.content.Intent)) @return: The source code of the specified method """ response = joern_remote(f'get_method_code_by_method_full_name("{method_full_name}")') return extract_value(response)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sfncat/mcp-joern'

If you have feedback or need assistance with the MCP directory API, please join our Discord server