Skip to main content
Glama
SWITCHSCIENCE

mcp-micropython-bridge

micropython_write_file

Write or overwrite files on a MicroPython board via USB Serial or WebREPL, enabling MCP clients to deploy code and data directly.

Instructions

MicroPython ボードのファイルに内容を書き込む(上書き)。

Args: path: 書き込み先ファイルのパス (例: "/main.py") content: 書き込むテキスト内容。content_base64 とは排他的 timeout: コード送信から Raw REPL 復帰完了までの全体タイムアウト秒数 encoding: content をバイト列に変換するエンコーディング content_base64: base64 で表した書き込みデータ。content とは排他的

Returns: ok: 書き込みに成功したら True path: 書き込み先パス bytes_written: 書き込んだバイト数 error: エラー時のメッセージ

Notes: contentcontent_base64 はどちらか片方のみ指定する。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentNo
timeoutNo
encodingNoutf-8
content_base64No

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pathYes
errorYes
bytes_writtenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the key destructive behavior (overwrite) and defines the timeout as covering code transmission through Raw REPL return, which is genuinely useful operational context. It omits permissions/auth needs, whether parent directories are created, and partial-write behavior.

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?

Nicely front-loaded: purpose first, then Args/Returns/Notes. Every section earns its place, though the Notes line duplicates the mutually-exclusive constraint already in the Args entry for content_base64, which is minor redundancy.

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?

An output schema exists, so the Returns block is partly redundant, but the Args coverage is complete for a 5-parameter tool with 0% schema description coverage. The mutual-exclusion rule is the one thing an agent could easily get wrong, and it is stated twice, making the definition operationally complete despite no annotation coverage.

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 0%, but the description compensates well by documenting all five parameters, including the crucial mutual-exclusion between content and content_base64, restated in Notes. However, it doesn't give an example of base64 usage or clarify encoding only applies to content, and the schema's anyOf/null defaults are left unexplained.

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?

States a specific verb+resource in 'MicroPython ボードのファイルに内容を書き込む(上書き)', and the parenthetical '(上書き)' (overwrite) immediately distinguishes it from the sibling micropython_append_file. An agent can separate write from append without opening either schema.

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 overwrite semantics imply when this is appropriate versus append_file, but no tool is named and there is no explicit 'when to use / when not to use' guidance. It also doesn't tell the agent to verify a path exists or to use micropython_upload_file for binary blobs. Usage is implied rather than stated.

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