Skip to main content
Glama

dosbox_read_framebuffer

Read-only

Capture raw framebuffer pixels directly from emulator video memory, bypassing window scaling for accurate quantitative screen analysis.

Instructions

Read the guest's screen straight out of the emulator's video memory: the palette indices the guest wrote, at the instant of the read, with no window, no scaling and no palette round trip. Prefer this over dosbox_capture_screen for anything quantitative -- photographing the window costs the guest real time and can catch a half-drawn frame.

FINDING THE PAGE NEEDS A REFERENCE. Give reference= a 64,000-byte frame of what is on screen and the page is confirmed byte for byte; without one this refuses, because a blind scan finds the most picture-like page in memory and on a real guest that is often a sprite bank or an offscreen buffer. Once confirmed the location is cached and every later read is free. allow_unconfirmed=true takes the guess anyway.

Writes .bin (one byte per pixel) and .png when stem is given. A page-flipping game has more than one page; pass page_offset from the pages list to read the other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
stemNoOutput path without a suffix; omit to only report.
relocateNoSearch for the page again rather than reusing the cached one.
referenceNoPath to a 64,000-byte frame of what is on screen, to confirm the page.
page_offsetNoByte offset of the page, from a previous call's pages list.
allow_unconfirmedNoAccept an unconfirmed blind scan; check the result yourself.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description goes far beyond the readOnlyHint by explaining that a reference page is required for confirmation, that a blind scan otherwise occurs but is refused, that confirmed locations are cached, and that the tool writes <stem>.bin and <stem>.png when a stem is provided. These are consequential observable behaviors an agent needs to know.

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?

Three paragraphs, each with a distinct job: what it is, the reference/caching constraint, and the outputs/page-flip behavior. It is longer than the minimal examples but stays dense and front-loaded; the all-caps phrase is loud but not actually redundant.

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?

For a 6-parameter tool with no required arguments, this description supplies the essential decision context: when to use it, what the reference requirement is, why the cache exists, what files are written, and how page_offset relates to page-flipping. With the output schema present, the return values need not be re-explained.

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

Parameters4/5

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

Schema coverage is high (83%), so the schema does much of the work. The description adds meaningful semantics to reference (64,000-byte frame, byte-for-byte confirmation), stem (writes .bin/.png), page_offset (page-flipping games), and allow_unconfirmed (takes the unsafe blind scan). It does not add nuance for pid or expose the 'relocate' parameter by name, though schema descriptions cover those.

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 opens with a specific, purposeful verb and resource: "Read the guest's screen straight out of the emulator's video memory." It then precisely characterizes the return (palette indices at the instant of the read) and calls out the sibling it is not, dosbox_capture_screen, making the tool unambiguous.

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

Usage Guidelines5/5

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

Explicit usage guidance: 'Prefer this over dosbox_capture_screen for anything quantitative,' with reasoning about guest-time cost and half-drawn frames. It also states the reference requirement, the refusal to guess by default, and when allow_unconfirmed is appropriate.

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