Skip to main content
Glama

Write a ROM/RAM memory image

memory_write

Create or update Intel/Altera MIF files with explicit width, depth, and hexadecimal data, filling unused addresses. Preview changes or apply with SHA-256 checks and backups.

Instructions

Generate an Intel/Altera MIF with explicit WIDTH, DEPTH, hexadecimal addresses/data and initialized unused addresses. Arbitrary width values may use integer strings. Preview or apply to a .mif with hash checking/backups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to the project/workspace. Absolute paths must remain inside that scope.
depthYesNumber of memory addresses.
widthYesWord width in bits.
valuesYesAddress-zero-first unsigned values. Large values use decimal, 0x-prefixed hex or 0b-prefixed binary strings.
confirmNoApply the described file change when true; otherwise return a preview. This is a tool argument, not a request for another user approval.
projectNoExisting .acf project path or unambiguous project name. File paths are scoped to its directory.
workspaceNoWorkspace directory for resolving project names, or the scope when no project is supplied.
defaultValueNoValue for remaining addresses, default 0.
expectedSha256NoExisting MIF SHA-256 if replacing a file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already mark this as a non-read-only, non-destructive, non-idempotent write, so the safety profile is covered. The description adds genuine behavioral context beyond that: that apply mode performs hash checking and creates backups, that unused addresses are initialized, and that a dry-run preview is returned when confirm is false. It does not describe failure behavior or rate/scope constraints, keeping it out of 5 territory.

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 compact sentences with the verb and resource front-loaded. The middle sentence about integer strings for arbitrary widths is slightly cryptic and could be read as conflicting with width being an integer, but overall there is little waste.

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

Completeness4/5

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

For a file-writing tool with no output schema, the description does explain what is returned in preview mode and that apply is guarded by hash checking and backups. It is nearly complete for an agent to invoke correctly; only edge-case behavior (overwrite conflicts, error returns) is left unspecified.

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 100%, so the baseline is 3 and the schema already documents all nine parameters in detail. The description adds marginal semantic value by tying 'initialized unused addresses' to the defaultValue parameter and noting that width/depth are explicit rather than inferred, though the 'integer strings' remark largely restates the values schema.

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?

States a specific verb (Generate) and resource (Intel/Altera MIF memory image), and the description of explicit WIDTH/DEPTH and initialization makes it clear this produces a memory-init file rather than a stimulus or netlist artifact. It does not name a sibling tool to differentiate from, but the resource is concrete enough to disambiguate from stimulus_write or project_edit_file.

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?

The phrase 'Preview or apply to a .mif with hash checking/backups' implies a preview-then-apply workflow, which is useful guidance, but there is no explicit statement of when to choose this tool over stimulus_write or project_edit_file, and no stated prerequisites beyond the schema's project/workspace scoping.

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