Skip to main content
Glama

dosbox_install_trace

Destructive

Install a live trace in a running DOSBox-X guest without a debugger by redirecting a near CALL through a zero-filled cave that records registers, flags, and memory while keeping the emulator at full speed.

Instructions

Watch a running guest's code without a debugger. Redirects one near CALL in the live code segment through a zero-filled cave that calls the displaced target, preserves its flags, and records the registers and memory words you name -- then read them with dosbox_read_trace while the guest runs at full speed. Nothing on disk changes; the patch dies with the emulator. captures take: a register (ax bx cx dx si di bp sp), a segment register (ds es ss cs), flags, or memory -- word:0x9D10, byte:DS:0x7A0E, word:ES:0x0004. Memory is read through whatever DS holds when the cave runs; capture ds too if the routine changes it. Give expect_hex (the three bytes the call site should hold) so the trace refuses rather than landing on a moved target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
handleNoName for this trace; defaults to segment_offset.
call_atYesOffset of the near CALL to displace.
cave_atYesOffset of a zero-filled run, from dosbox_find_cave.
segmentYesGuest code segment.
capturesYesWhat to record at each hit.
expect_hexNoThe three bytes the call site must hold.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description richly discloses behavior beyond the annotations: it patches only live memory, calls the displaced target, preserves flags, records at each hit, and says the patch dies with the emulator. It also warns about the DS-relative memory caveat and the safety behavior of expect_hex.

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 long, but every sentence carries essential information: purpose, mechanism, lifecycle, capture format, memory caveat, and safety check. It is front-loaded with the core intent and then layers technical details without filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of code-injection tooling, the description covers the workflow, prerequisites, parameter semantics, and side effects thoroughly. The presence of an output schema removes the need to duplicate return-value details, and nothing critical for invoking the tool correctly appears missing.

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

Parameters5/5

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

The schema only gives names and short labels, but the description adds real semantics: exact capture syntax for registers, segment registers, flags, and memory addresses, plus the contract for expect_hex. This significantly reduces ambiguity about how to construct valid calls.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: it installs a trace/hook that displaces one near CALL in a running guest, routes it through a cave, and records targeted registers/memory. This clearly distinguishes it from related tools like dosbox_read_trace and dosbox_remove_trace.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives clear context for when to use it — watching code in a running guest without a debugger, then reading captured data via dosbox_read_trace. It also explains prerequisites like using a zero-filled cave from dosbox_find_cave, but it does not explicitly list when-not-to-use conditions or compare against other trace/read alternatives.

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/md0-code/dosbox-x-mcp'

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