write_value
Write a typed value to a memory address in a running process and return the previous value, so you can undo the change by writing that value back.
Instructions
Write a value to an address. Absent when the server is --read-only.
The previous value is read first and returned as previous_value, so
the change is reversible: to undo, call this again with that value.
Nothing else in this server can put it back.
:param address: hex string, e.g. "0x7FFD1234".
:param value_type: int, float, bool, str or bytes.
:param value: the value to write. Hex for bytes.
:param bufflength: for numbers, the exact write width — 1, 2, 4 or 8
for int, 4 or 8 for float, 1 for bool.
For ``bytes`` it is a maximum number of bytes, which truncates and
never pads. For ``str`` it caps **characters**, not bytes, so
non-ASCII text can overwrite more bytes than the number you pass:
``bufflength=2`` with ``"日本語"`` writes ``"日本"`` — six bytes.
The result's ``previous_value_bufflength`` always reports the span
that was actually replaced, so check it rather than assuming.
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>",
"value_type": "<value_type>",
"value": "<value>"
},
"name": "write_value"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| address | Yes | ||
| bufflength | No | ||
| session_id | Yes | ||
| value_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |