fix(server): music_generation has inconsistent indentation — try block indented inside function body
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Open minimax_mcp/server.py and inspect the music_generation() function alongside text_to_audio() for the expected indentation style. Run ruff check before and after the formatting change, and confirm the function body and closing parentheses match the stated acceptance criteria.
Written by the indexing model from the issue text.
Description
Problem
The music_generation() function has its entire try block indented one extra level compared to all other tool functions. This is a style inconsistency that suggests a copy-paste error.
Exact location
- File:
minimax_mcp/server.py - Function:
music_generation()
Evidence
def music_generation(...) -> TextContent:
try: # <-- extra indentation (8 spaces instead of 4)
if not prompt:
raise MinimaxRequestError("Prompt is required.")
...
except MinimaxAPIError as e:
return TextContent(
type="text",
text=f"Failed to generate music: {str(e)}"
)
except (IOError, requests.RequestException) as e:
return TextContent(
type="text",
text=f"Failed to save music: {str(e)}"
) # <-- closing paren misaligned
Compare with text_to_audio():
def text_to_audio(...):
if not text: # <-- correct indentation (4 spaces)
raise MinimaxRequestError("Text is required.")
...
Impact
- Code works but is confusing to read
- The misaligned closing paren on the last
exceptcould mask bugs - Linters (ruff, flake8) would flag this
Proposed solution
Dedent the entire function body by one level to match other functions. Fix the misaligned closing paren.
Acceptance criteria
music_generation()body indented at 4 spaces (same as all other functions)- All closing parens properly aligned
ruff checkpasses with no indentation warnings
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/MiniMax-MCP
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/MiniMax-MCP#89 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
MiniMax-AI/MiniMax-MCP#88 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
MiniMax-AI/MiniMax-MCP#78 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
MiniMax-AI/MiniMax-MCP#105 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MiniMax-AI/MiniMax-MCP#103 ·
All issues in MiniMax-AI/MiniMax-MCP
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100