Skip to main content
Glama
sfncat
by sfncat

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)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes the core behavior (retrieving source code) and mentions the return type, but lacks details about error handling, performance characteristics, or data format. While adequate for basic understanding, it doesn't provide rich behavioral context beyond the fundamental operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences that each serve distinct purposes: stating the tool's function, providing usage guidelines, and explaining the parameter. While efficient, the first sentence contains a minor typo ('fully name' instead of 'full name'), slightly affecting polish.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read operation with no output schema, the description provides good coverage: it explains what the tool does, when to use it, parameter semantics, and return value. The main gap is the lack of output format details beyond 'The source code,' but given the tool's relative simplicity, this is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single parameter, the description fully compensates by providing a clear @param annotation that explains what 'method_full_name' represents, including a detailed example format. This adds significant semantic value beyond what the bare schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get the code of a method') and resource ('by its fully name'), with explicit differentiation from the sibling tool 'get_method_code_by_class_full_name_and_method_name'. It provides a precise verb+resource combination that distinguishes it from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('If you know the full name of the method') and when to use an alternative ('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'). This provides clear, actionable guidance for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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