Skip to main content
Glama

get_current_function

Retrieves the function that contains the address currently selected in Ghidra, letting analysts identify and inspect the active function during reverse engineering.

Instructions

Get the function containing the address currently selected in the Ghidra GUI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.2/5.0
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 of behavioral disclosure. It indicates a read-like operation and the source of the input (current GUI selection), but it does not state what happens if no address is selected, whether it can fail, or any other operational behavior beyond the basic retrieval.

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

Conciseness5/5

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

A single, front-loaded sentence with no filler. Every word contributes to identifying the operation and its input source.

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?

Given the tool's simplicity, zero parameters, and an output schema covering return values, the description is nearly sufficient. It could be more complete by mentioning error behavior when no function is selected, but that is a minor gap for a straightforward GUI getter.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing for the schema to document and no parameter semantics needed in the description. Baseline 4 applies for a parameterless tool.

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?

States a specific verb and resource ('Get the function') and identifies the exact scope ('containing the address currently selected in the Ghidra GUI'). This clearly distinguishes it from siblings like get_function_by_address and get_current_address, which operate on explicit addresses rather than the current GUI selection.

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

Usage Guidelines4/5

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

The description gives a clear condition for use: the address must be currently selected in the Ghidra GUI. It does not explicitly name alternatives such as get_function_by_address or state when not to use this tool, but the GUI-selection scope is enough for an agent to infer the correct context.

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