Skip to main content
Glama

Patch Asm

patch_asm

Assemble assembly instructions and patch them into a binary at specified addresses, enabling precise code modifications when processor assembler support is available.

Instructions

Assemble instruction text and patch it at address(es). Requires processor assembler support (e.g. x86).

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": {
      "items": "<items>"
    },
    "name": "patch_asm"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesList of {address, asm} objects
timeoutNoTimeout in seconds
instance_idNoREQUIRED whenever more than one database is open (from open_database's result or list_databases()); optional only while exactly one instance is live.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • changedInput schema / properties / instance_id / description
      Previous value: -"Instance id override"New value: +"REQUIRED whenever more than one database is open (from open_database's result or list_databases()); optional only while exactly one instance is live."
  2. First observedv0.9.7

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden. It discloses the assembler dependency but says nothing about mutation semantics: whether the patch is applied to the live database or the file, whether it can be undone, or how partial failures across the item list are handled.

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 short sentences with the action front-loaded and the prerequisite second. Zero waste, though the second sentence could be tightened into the first.

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 batch mutation tool with no annotations and no output schema, the definition covers the action, the input shape via schema, and the key environmental prerequisite. The main remaining gap is failure/atomicity semantics across the item list, which matters for a batch patch but is a secondary concern.

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

Parameters3/5

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

Schema coverage is 100% and the schema describes all three parameters, including the conditional instance_id requirement. The description adds nothing about the {address, asm} item shape, so it neither adds nor detracts from the schema.

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 chain and resource: assemble instruction text and patch it at address(es), which implicitly distinguishes it from patch_bytes (raw bytes) and apply_patch. It does not name any sibling explicitly, so an agent must infer the distinction rather than being told.

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 a useful precondition (assembler must be available for the target processor, e.g. x86), which tells the agent when the tool will fail. However it never says when to prefer this over patch_bytes or apply_patch, or what to do when assembler support is missing.

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