Skip to main content
Glama

patch_code

Patch and analyze code by dispatching module actions: create or verify PE signatures, emulate functions, dump IL2CPP metadata, and generate Frida scripts for dynamic instrumentation.

Instructions

Code patching helpers. Dispatches by module+action.

Modules/actions: pe: make_signature (path, address, length, wildcard_offsets), verify_signature (path, signature), emulate_function (code_hex, entry_offset, arch, args) apk: il2cpp_dump dynamic: frida_script

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": {
      "module": "<module>",
      "action": "<action>"
    },
    "name": "patch_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
moduleYes
paramsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies mutation through terms like patching and make_signature, but does not disclose side effects, required permissions, reversibility, file modification behavior, or what the different modules actually do.

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?

The description is compact and front-loaded with the dispatch model before enumerating module/action combinations. The grouped list is efficient, though some action names remain cryptic without further explanation.

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?

This is a multi-action dispatcher with no annotations and 0% schema description coverage, so the description needs to carry most of the explanatory load. It partially satisfies that with an action map, but leaves out behavioral safety details, when-to-use guidance, and parameter semantics for two of the three modules.

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 description coverage is 0%, and the top-level schema only defines module, action, and an opaque params object. The description adds valuable nested parameter keys for the pe actions, but does not explain formats such as address, code_hex, arch values, or wildcard_offsets syntax, and gives no params details for the apk or dynamic actions.

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 states that this tool provides code patching helpers and dispatches by module plus action, then enumerates the supported module/action combinations. That is specific enough to distinguish it from generic sibling tools such as edit or validate, although the individual actions are named without explanation.

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?

The description explains how dispatch works via module and action, but gives no guidance on when an agent should choose patch_code over its siblings. There are no conditions, exclusions, or alternatives identified.

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