[Bug for MCP&API]: Slashes in text break local output file saving
評価
調査の方向性
minimax_mcp/utils.py の build_output_file() から始め、次に minimax_mcp/server.py のローカル保存パスを調べます。提供されている TemporaryDirectory スクリプトで問題を再現し、日付形式のスラッシュを含むテキストを対象とするリグレッションテストを追加します。両方の日付形式で、要求された出力ディレクトリ内に直接ファイルが生成され、書き込みが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Text starting with a date like 2026/10/03 breaks local output saving for
text_to_audio (MINIMAX_API_RESOURCE_MODE=local).
build_output_file() takes the first 10 characters and only replaces spaces.
The result is t2a_2026/10/03_<timestamp>.mp3. The slashes are treated as path
separators, but those directories don't exist. Changing the date to 2026-10-03
lets the file save normally.
Reproduction
Run this from the repository root with the Python dependencies installed. It
imports the unmodified utility and writes test bytes directly to a temporary
directory, without calling the API. Both inputs use the same absolute output
path, which also avoids the separate path-joining issue.
from pathlib import Path
from tempfile import TemporaryDirectory
from minimax_mcp.utils import build_output_file, build_output_path
records = []
with TemporaryDirectory() as directory:
output_path = build_output_path(str(Path(directory) / "output"))
for text in ("2026-10-03", "2026/10/03"):
output_file = build_output_file("t2a", text, output_path, "mp3")
output_path.parent.mkdir(parents=True, exist_ok=True)
try:
with open(output_path / output_file, "wb") as stream:
stream.write(b"local write probe")
result = "saved"
except OSError as error:
result = type(error).__name__
parent_matches = output_file.parent == output_path
print(text, "parent_matches:", parent_matches, "write:", result)
records.append({"text": text, "parent_matches": parent_matches, "write": result})
Both runs gave this output:
2026-10-03 parent_matches: True write: saved
2026/10/03 parent_matches: False write: FileNotFoundError
Both inputs should save directly inside the requested directory.
Environment
Windows, Python 3.11.9, package version 0.0.19 at
0856b9aef8a9d676bb63bdd6b6426d7b640a3b7a.
Models used and Trace-ID: N/A (local reproduction, no request).
The relevant code is filename construction
and the local audio save path.
I've checked the Python/JS READMEs, MCP guide and existing issues. #73/#74 address
repeated path joining, and #92 covers nested-directory writability; none changes
how text becomes a filename.
Would you be open to a small fix that replaces path separators in the text,
keeps ordinary Unicode characters, and adds a file-write regression test?
- 主要言語
- Python
- スター
- 1.6k
- フォーク
- 284
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/MiniMax-MCP のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MiniMax-AI/MiniMax-MCP#89 · コメント 1 件 ·
-
bug(server): text_to_audio validates text outside try/except, inconsistent with other tools対応中かも @cnYui が 121 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
MiniMax-AI/MiniMax-MCP#88 ·
-
Information disclosure for `play_audio`対応中かも @TumCucTom が 126 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
MiniMax-AI/MiniMax-MCP#78 ·
-
fix(server): music_generation has inconsistent indentation — try block indented inside function body対応中かも @TumCucTom が 126 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
MiniMax-AI/MiniMax-MCP#69 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
MiniMax-AI/MiniMax-MCP#105 · コメント 1 件 ·
MiniMax-AI/MiniMax-MCP の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
modelcontextprotocol/python-sdk#3648 ·
メンテナーはふだん 1 日以内に返信
-
docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
VenetoStato/giorgio#6 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
EclipseFdn/open-vsx.org#13831 ·
メンテナーはふだん 1 日以内に返信