Repository navigation
fix(mcp): pass empty args when a command tool omits them - #43
Conversation
tools/call with an arguments object that has no args field fell
through to the whole object. The Hermes command handler then
received {} instead of a string. babelfish_task_start already
defaults a missing command args field to an empty string.
An explicit args string is unchanged.
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 5:29 AM ET / 09:29 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch defaults omitted Hermes MCP command arguments to an empty string, documents that behavior, and adds coverage through the built CLI and Python bridge. Merge readiness✅ Ready for maintainer review This PR remains useful because current main still forwards an empty argument object to command handlers. The prior documentation finding is resolved, the supplied production-path proof covers the repair, and no blocking defect remains. Priority: P2 Review scores
Verification
How this fits togetherBabelfish’s optional MCP server exposes installed Hermes plugin commands to MCP clients. It translates incoming tool calls into Python bridge requests and returns the command handler’s result. flowchart LR
A[MCP client] --> B[Stdio server]
B --> C[Installed command route]
C --> D[Optional argument default]
D --> E[Python bridge]
E --> F[Plugin command handler]
F --> G[MCP result]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Preserve the narrow empty-string default while keeping explicit command text, tool arguments, and background-task behavior intact. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the current-main failure: calling an imported command with arguments {} forwards that object to the Python handler instead of the existing empty-string default. No current-main execution was performed during this read-only review. Is this the best way to solve the issue? Yes, removing the whole-object fallback is the narrowest repair for the advertised optional string field, and the added stdio coverage verifies explicit text and background compatibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b5a7b6b461f5. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
Summary
arguments,{},{ "args": "" }, and explicit text.Compatibility
babelfish_command__hermes__<plugin>__<command>."". Explicit text and command routing are unchanged.Verification
Exact candidate:
344f868465754d0562f7f5047024fefd74fddf05.Original contributor head:
70a107f58a2a602ef5c624ee8d6cc717bce08a5d.src/mcp-server.test.ts: 9 tests passed.npm run check: build and 135 tests passed across 11 files.npm run pack:check: 24 package files, 279074 bytes unpacked.session
01a0f6c8-2e9f-7072-915f-a59cac4314b0, no actionable findings.pre-merge items, review.
low-memory, and
CodeQL passed.
Real Behavior Proof
On October 1, 2026, Node 26.8.1 / npm 11.19.1 / Python 3.14.6 / macOS arm64:
The committed
preserves optional command arguments through built stdiotestbuilds the real CLI entrypoint with production bundling settings in a temporary
runtime and copies the Python helper there,
sets isolated HOME and plugin state, and speaks MCP stdio to
dist/bin.js mcp.Its real Python command handler returns:
arguments{"command":""}{}{"command":""}{"args":""}{"command":""}{"args":"explicit text"}{"command":"explicit text"}The same session starts a background command without args and observes
status: "completed"with the unchanged{plugin, command, result}envelope andinner
{"command":""}result. Existing native-tool and task-capacity tests also pass.This proves the built MCP/Python route, not third-party client UI behavior.
Review Resolution
The prior ClawSweeper finding about missing README compatibility documentation is
resolved in the Compatible commands row, with matching reference documentation.
Independent review identified a stale-build prerequisite in the first test
revision. The test now builds inside its temporary runtime; a focused run after
node scripts/clean-dist.mjspassed all 9 tests.Maintainer additions preserve the original contributor commit and scope.
Thanks @SebTardif.