Skip to main content
Glama
mcp-sjis-server

mcp-sjis-server

by fukumen

sjis_write

Writes a complete file in Shift JIS/CP932 encoding, preserving the detected encoding of existing files and using Shift JIS for new files; use for full overwrites instead of terminal heredocs.

Instructions

Shift JIS/CP932 エンコーディングでファイルを書き込みます。terminal の echo/cat ヒアドキュメントの代わりに使用してください。ファイルの内容を完全に上書きします — 部分的な編集には sjis_patch を使用してください。既存ファイルは検出された文字コードのまま上書きし、新規ファイルは Shift JIS で書き込みます。

注意: content に指定した行末コード(CRLF/LF/CR)はそのままファイルに書き込まれます。既存ファイルの行末コードを維持する場合は、読み込んだ内容の行末コードをそのまま使用してください。

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>",
      "content": "<content>"
    },
    "name": "sjis_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesファイルの絶対パス
contentYes書き込む UTF-8 文字列

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that the file is completely overwritten, that existing files keep their detected encoding while new files default to Shift JIS, and that line endings in content are written verbatim. It does not cover error behavior, permission requirements, or whether a result value is returned, which keeps it short of a 5.

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 with the core purpose, then the overwrite caveat and sibling routing, then a clearly marked note on line endings. Every sentence carries operational information; only the line-ending note is slightly repetitive.

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 two-parameter write tool with no output schema and no annotations, the description covers the essentials an agent needs: encoding policy, destructive full-overwrite semantics, the patch alternative, and line-ending behavior. Return value and failure modes are the only notable omissions.

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 description adds real meaning: content is a UTF-8 string in the schema but is transcoded to Shift JIS/CP932 on write, and its line-ending characters are passed through unchanged rather than normalized. That transcoding caveat is not derivable from the schema alone.

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 and resource (write files) plus the exact encoding (Shift JIS/CP932), and explicitly names the sibling it is not for partial edits: sjis_patch. An agent can distinguish it from sjis_read/sjis_patch without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance ('instead of terminal echo/cat heredoc') and an explicit when-not, routing partial edits to sjis_patch. The rule for preserving existing line endings by copying them from read content practically links it to sjis_read.

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

Deploy Server

Other Tools