Skip to main content
Glama

patch.assemble

Assemble instruction text at a target address and write the resulting machine-code bytes into the current Ghidra session.

Instructions

Assemble instruction text at an address and write the resulting bytes.

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": {
      "session_id": "<session_id>",
      "address": "<address>",
      "assembly": "<assembly>"
    },
    "name": "patch.assemble"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYes
assemblyYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses that bytes are written (a mutation), but says nothing about whether the patch is committed immediately, what happens on invalid assembly or a non-code address, whether it can be undone, or what a failed assembly returns.

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?

A single front-loaded sentence with no filler; the effect (assembling then writing) is stated compactly. Its brevity is appropriate in form, though it leaves substance uncovered.

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

Completeness2/5

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

For a three-parameter mutation tool with no annotations and no output schema, one sentence is not enough. The session dependency, address semantics, assembly syntax expectations, and failure behavior are all absent, leaving the agent under-informed before a write operation.

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 explain the three parameters. It hints at 'address' and 'assembly' implicitly, but never explains the accepted address form (the schema allows integer or string), the assembly dialect/syntax, or the role of session_id, which is entirely unmentioned despite being required.

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?

The description names a specific verb ('Assemble') and resource ('instruction text') plus the side effect ('write the resulting bytes'), so the agent can tell it patches assembled instructions at an address. It offers no differentiation from siblings such as patch.nop or patch.branch_invert, which is the main gap.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites (an active session, a valid target address), and no reference to alternatives for patching. The agent must infer usage entirely from the verb.

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