Skip to main content
Glama
SWITCHSCIENCE

mcp-micropython-bridge

micropython_tail_lines

Read the last lines of a text file on a MicroPython board to inspect recent log or output content without transferring the whole file.

Instructions

MicroPython ボード上のテキストファイル末尾の数行を返す。

Args: path: 対象ファイルパス lines: 返却する最大行数 timeout: コード送信から Raw REPL 復帰完了までの全体タイムアウト秒数 encoding: テキストデコードに使うエンコーディング errors: テキストデコード時のエラー処理

Returns: ok: 読み出しに成功したら True path: 対象ファイルパス content: 返したテキスト line_count: 返した行数 truncated: 返せなかった先頭側の行があるとき True error: エラー時のメッセージ

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
linesNo
errorsNostrict
timeoutNo
encodingNoutf-8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pathYes
errorYes
contentYes
truncatedYes
line_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/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 behavioral burden. It does add real value by explaining that timeout spans code transmission through Raw REPL return and by declaring a 'truncated' flag for dropped leading lines, but it says nothing about connection state requirements, failure/recovery behavior, or whether the read is non-destructive.

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?

Front-loaded one-line purpose followed by structured Args/Returns blocks; each entry is a single clause with no filler. The Returns block partially duplicates the existing output schema, which is the only redundancy.

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

Completeness3/5

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

For a five-parameter file-reading tool with an output schema and no annotations, the description covers the arguments and return shape adequately, but the complete absence of routing guidance against the many read/list siblings leaves a real gap for agent selection.

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 description coverage is 0%, so the description must compensate, and it does: all five parameters (path, lines, timeout, encoding, errors) receive a short gloss. The explanations are terse and omit valid value ranges or the meaning of 'errors' modes, but they prevent the parameters from being opaque.

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 and resource: returns the last lines of a text file on a MicroPython board. An agent can distinguish it from micropython_read_file and micropython_head_lines by the 'tail' concept, but the description never names or contrasts those siblings explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says when tailing is preferable to micropython_read_lines, micropython_head_lines, or micropython_read_file, and no preconditions (e.g. connection must be established) are stated. Usage is only inferable from the tool name.

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