Skip to main content
Glama

port_write

Write a byte or word to an x86 I/O port to configure hardware, unchain Mode X, or control Hercules graphics.

Instructions

Write to an x86 I/O port. Width is 1 (byte) or 2 (word). For Mode X unchaining, Hercules graphics, hardware config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYesI/O port address (0x0000..0xFFFF).
valueYesValue to write.
widthNoWidth: 1 (byte) or 2 (word). Default 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior2/5

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

The annotations only declare readOnlyHint=false, and the description confirms this is a write. Beyond that, it does not disclose safety implications, unsupported ports, error behavior, reversibility, or side effects. For a low-level hardware write operation, this leaves important behavioral context missing.

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?

Three short sentences front-load the core action, then specify width and use cases. There is no filler, and the structure lets an agent quickly identify purpose and applicability.

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?

There is no output schema and annotations are sparse, so the description carries most of the contextual burden. Given the risk and complexity of hardware I/O writes, it should include cautions, expected effects, or failure behavior, but it does not.

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%, so the schema already documents port range, value, and width semantics. The description repeats the width meaning but does not add format, constraint, or edge-case details beyond the schema, making the baseline 3 appropriate.

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 gives a specific verb and resource: 'Write to an x86 I/O port.' This clearly distinguishes the tool from the sibling port_read and from memory-writing tools such as mem_write. Width and concrete hardware use cases add further specificity.

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

Usage Guidelines3/5

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

It names concrete contexts for use ('Mode X unchaining, Hercules graphics, hardware config'), which implies when the tool is appropriate. However, it does not say when not to use it, nor does it point to alternatives like port_read or mem_write for related operations.

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