feat(mcp): Phase 2 — tools/call stdio contract#358
Merged
Conversation
Refs #293 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
@erishforG
parsec mcp serve의 stdio JSON-RPC skeleton에tools/callrequest contract를 추가했습니다.왜
Refs #293
Phase 2 transport에서
initialize와tools/list는 준비되어 있었지만, MCP clients가 다음으로 호출할tools/call은 method-level placeholder만 있었습니다. 실제 tool dispatch 전 단계로 요청 shape와 응답 envelope를 고정합니다.변경
tools/callparams 검증 추가:name, optional objectarguments, registered tool nameisError: trueskeleton 응답 반환-32602 Invalid params로 명확히 실패tools/callregistered/unknown cases 추가다음 Phase 힌트
McpContext와 registry를 넘겨 실제 handler dispatch wiringtodo!()제거 전에 mutating/dry_run 및 GitHub scope guard 추가tools/callrecording 추가리스크
Low. 변경은
src/mcp/와tests/mcp/에만 제한되며 기존 CLI command behavior나 worktree/git core path를 건드리지 않습니다.롤백
이 PR의 단일 커밋을 revert하면 기존
tools/callplaceholder 상태로 돌아갑니다.Test plan
cargo fmt --checkcargo build --quietcargo clippy --all-targets -- -D warningscargo test --quiet