Skip to main content
Glama

layout.struct.field.replace

Replace an existing structure field with a new type, size, name, or comment to correct struct layouts during reverse engineering.

Instructions

Replace an existing structure field with a new type, size, name, or comment.

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>",
      "offset": "<offset>",
      "data_type": "<data_type>"
    },
    "name": "layout.struct.field.replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
lengthNo
offsetYes
commentNo
data_typeYes
field_nameNo
session_idYes
struct_nameNo
struct_pathNo

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 provided, so the description carries the full burden. It says 'Replace' but not whether the prior field definition is destroyed, whether offsets of subsequent fields shift, what happens on type/size mismatch, or what a successful response contains. For a destructive layout mutation 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?

A single front-loaded sentence with no filler or redundancy. Its brevity is appropriate structurally, though it leaves much unsaid (handled under contextual completeness rather than here).

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?

With 8 undocumented parameters, no annotations and no output schema, the definition is thin for a destructive layout mutation. Half the parameters, including the required offset and session_id, are unexplained and there is no statement of failure modes or side effects.

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% across 8 parameters, so the description must compensate. It only implies data_type, length, field_name and comment; it says nothing about session_id, offset, struct_name, or struct_path, nor which of struct_name/struct_path is expected or how offset is interpreted.

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 ('Replace') and resource ('structure field') plus the attributes that can change (type, size, name, comment), so the operation is identifiable. It does not distinguish itself from siblings such as layout.struct.field.rename or layout.struct.field.comment.set, which overlap with the 'name' and 'comment' cases mentioned here.

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?

No when-to-use guidance, no prerequisites, and no exclusions. An agent cannot tell from this text whether to use this tool or the sibling rename/comment.set tools when only a name or comment is changing.

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