Skip to main content
Glama

Annotate Native Function

annotate_native_function
DestructiveIdempotent

Atomically updates a function’s name and entry comments in Ghidra’s session, then reads them back and returns a refreshed dossier; original executable bytes stay unchanged.

Instructions

Atomically update one function name and/or entry comments, read them back, and return a refreshed complete function dossier. Ghidra changes its ephemeral session analysis database only; original executable bytes remain unchanged. Empty comment text clears that comment. Edits remain available to subsequent MCP calls until close; CLI returns the updated dossier before discarding its session. Invalid edits roll back the entire operation. Windows P0 and providers without this capability are unsupported.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "entry",
      "comment": "Analyst observation",
      "procedure": "0x10100"
    },
    "name": "annotate_native_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoExact name used by this operation.
commentNoRegular entry comment; empty text clears it
procedureYes
inline_commentNoInline entry comment; empty text clears it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Goes well past the annotations: changes hit Ghidra's ephemeral session analysis database, original executable bytes stay untouched, empty comment text clears that comment, invalid edits roll back the whole operation, and edits persist for later MCP calls until close. This directly clarifies the destructiveHint=true / idempotentHint=true profile with concrete scope.

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?

Front-loaded with the atomic action sequence, followed by scope, clearing, persistence, rollback, and platform caveats — each sentence carries distinct information. It is dense but not padded; a light restructuring into bullets would help scanning.

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?

No output schema exists, and the description compensates by naming the return value (a refreshed complete function dossier) and its persistence behavior. It falls short only on the required 'procedure' argument and on what happens when no name or comment is supplied.

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?

Schema coverage is 75%, and the description reinforces clearing semantics for both comment fields and frames name/comment as an 'and/or' alternative set. It never explains the required 'procedure' parameter (address format, e.g. '0x10100' only appears in the schema example), which is the one meaningful gap.

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

Purpose4/5

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

States a specific verb and resource: atomically update one function's name and/or entry comments, then return a refreshed dossier. It is clear what the tool does, but it never distinguishes itself from the sibling 'comment' tool, leaving the agent to guess which mutation path to use.

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

Usage Guidelines3/5

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

Gives real exclusions — Windows P0 and providers lacking the capability are unsupported — plus the caveat that CLI returns the dossier before discarding its session. It does not say when to prefer this over the sibling 'comment' tool or what to do when only reading metadata.

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

Deploy Server

Other Tools