Skip to main content
Glama

write_memory

Modify process memory by writing hex bytes to a target address. Patch code or data during debugging and reverse engineering.

Instructions

Write hex bytes to memory. ⚠ Modifies process state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesContiguous hex string WITHOUT spaces or 0x prefix. Example: '90909090' = 4x NOP. '4831C0' = xor rax,rax. NOTE: Unlike search_pattern which uses spaces between bytes, write_memory expects a solid hex string.
addressYesMemory address as hex string. ALWAYS use '0x' prefix. Examples: '0x401000', '0x7FFE0308', '0x00007FF7C0001234'. WARNING: without '0x' prefix, '401000' is treated as decimal 401000, not hex 0x401000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoStructured result data (varies by tool)
errorNo
detailsNoDetailed text breakdown
successYes
summaryYesOne-line human-readable result
suggested_next_toolsNoTools recommended to call next based on this result
Behavior3/5

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

With no annotations, the description carries the full burden and does include a useful '⚠ Modifies process state' warning, which alerts the agent to the mutating nature of the operation. However, it lacks further behavioral details such as irreversibility, permission requirements, or crash risk, so the transparency is only partially addressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with the core purpose front-loaded and a relevant safety warning. There is no filler or redundant content, making it appropriately concise and well-structured.

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?

The description plus the highly detailed input schema and an output schema cover the essential mechanics of the operation. However, it lacks context about when to choose this tool over sibling write/patch tools and only offers a generic hazard warning, leaving some contextual gap.

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 100%, with detailed descriptions for both required parameters: 'address' explains the 0x prefix requirement and decimal misinterpretation risk, and 'data' explains the contiguous hex format with examples and contrast to search_pattern. The tool description adds no parameter information, so baseline 3 is appropriate.

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 clearly states the tool's function ('Write hex bytes to memory') with a specific verb and resource. However, it does not differentiate from sibling write/patch tools like windbg_write_memory or ida_patch_bytes, so it falls 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 Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as windbg_write_memory or ida_patch_bytes. There are no exclusions, conditions, or contextual hints beyond the implied purpose of writing memory.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DdUdle/ctxdebug'

If you have feedback or need assistance with the MCP directory API, please join our Discord server