Skip to main content
Glama

ghidra.eval

Execute Python code in the live Ghidra runtime to automate reverse-engineering tasks; set write=true to access a read-only session as writable.

Instructions

Evaluate Python code inside the live Ghidra runtime context. Raw access to a read-only session requires write=true and transitions it to writable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "ghidra.eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
writeNo
session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It does disclose one important side effect — write=true transitions a read-only session to writable — but says nothing about that this executes arbitrary code with full runtime privileges, whether failures/timeouts are surfaced, or what is returned. For a code-execution tool this is a substantial gap.

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?

Two sentences, front-loaded with the core action and no filler. The second sentence is compressed to the point of being slightly ambiguous about what 'Raw access' refers to.

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

Completeness3/5

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

Core mechanics (what runs, where, and the write escalation) are covered, but for a 3-parameter code-execution tool with no annotations, no output schema, and zero schema coverage, the definition leaves return values, error behavior, and session_id entirely undocumented.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explains the write flag's effect and the code parameter is self-evident, but session_id is never mentioned and no format or default behavior for any parameter is given.

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?

Specific verb and resource: 'Evaluate Python code inside the live Ghidra runtime context' tells an agent exactly what executes and where. It does not differentiate itself from the sibling code-execution tools (ghidra.call, ghidra.script), so it stops short of a 5.

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?

The write=true condition on read-only sessions is a useful prerequisite, but usage is only implied: an agent must infer that this is the escape hatch for arbitrary Python versus ghidra.call/ghidra.script. No explicit when-to-use or when-not-to-use guidance is given.

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