Skip to main content
Glama
microbit-makecode-mcp

microbit-makecode-mcp

save_hex

Compile a MakeCode program and save its .hex file to a chosen path so you can copy it to the MICROBIT drive to flash the board or reopen it later with its source.

Instructions

Compile the program and save the .hex file on this computer. The file can be copied to the MICROBIT drive to flash it, and opened again with open_file (it contains the source).

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": {
      "path": "<path>"
    },
    "name": "save_hex"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDestination .hex path (relative to the server's working directory or absolute)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that it compiles (a computation with possible failure) and that the output is a local file containing the source, but says nothing about overwrite behavior, what happens on compile error, or whether existing files at the path are replaced.

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?

Two sentences with the action front-loaded and no filler. The second sentence earns its place by explaining the file's downstream use, though it could be trimmed slightly.

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 one-parameter tool with no output schema, the description covers the compile step, the write destination, and the file's purpose. The main gap is failure and overwrite semantics, which matter for a file-writing compile operation.

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 coverage is 100% and the single path parameter is fully documented in the schema. The description reinforces the destination by saying 'on this computer,' matching the server-relative/absolute semantics, but adds no format or constraint detail beyond the 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 compound action: compile the program and write a .hex file to a given path. That is concrete enough to separate it from flash, which is implied by the note that the file 'can be copied to the MICROBIT drive to flash it,' though the differentiation is indirect rather than explicit.

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?

Usage is implied through the workflow it sketches (save .hex, then copy to MICROBIT, or reopen with open_file). It names a related sibling but never states when to choose save_hex vs. flash or what conditions make it inappropriate.

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