From 24c8297df1d0586efb37c88d91fe88886e5b1fcc Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 20 Jun 2026 18:19:01 +0900 Subject: [PATCH] ticket: close mcp tools call --- .yoi/tickets/00001KVHR3WSD/item.md | 4 +- .yoi/tickets/00001KVHR3WSD/resolution.md | 37 +++++++++++++++++ .yoi/tickets/00001KVHR3WSD/thread.md | 53 ++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 .yoi/tickets/00001KVHR3WSD/resolution.md diff --git a/.yoi/tickets/00001KVHR3WSD/item.md b/.yoi/tickets/00001KVHR3WSD/item.md index f39b67b3..66cd1b82 100644 --- a/.yoi/tickets/00001KVHR3WSD/item.md +++ b/.yoi/tickets/00001KVHR3WSD/item.md @@ -1,8 +1,8 @@ --- title: 'MCP: execute tools/call through ordinary Tool path' -state: 'done' +state: 'closed' created_at: '2026-06-20T05:30:04Z' -updated_at: '2026-06-20T09:18:12Z' +updated_at: '2026-06-20T09:18:51Z' assignee: null readiness: 'implementation_ready' risk_flags: ['mcp', 'tools-call', 'permission', 'history', 'bounded-output'] diff --git a/.yoi/tickets/00001KVHR3WSD/resolution.md b/.yoi/tickets/00001KVHR3WSD/resolution.md new file mode 100644 index 00000000..5dad53c2 --- /dev/null +++ b/.yoi/tickets/00001KVHR3WSD/resolution.md @@ -0,0 +1,37 @@ +## Resolution + +`00001KVHR3WSD` を完了しました。 + +実装内容: +- MCP `tools/call` typed request/result/content types を追加しました。 +- `McpStdioClient::call_tool(...)` を追加しました。 +- MCP discovered tool の discovery-only stub を executable `McpStdioTool` に置き換えました。 +- Execution は configured stdio MCP server を spawn/initialize し、`tools/call` を送信して shutdown します。 +- Permission denial は ordinary Worker `PreToolCall` path により Tool execution 前に適用されるため、denied call は MCP server に送信されません。 +- Results は ordinary Tool result/history path を通ります。Hidden context injection はありません。 +- Normal MCP result、MCP `isError: true`、JSON-RPC protocol error を区別しました。 +- MCP content / structuredContent / `_meta` / rich output は untrusted data として bounded に serialization されます。 +- Image/audio data は raw payload を落とし、size metadata のみ残します。 +- Resources/read、prompts/get、list_changed、sampling、elicitation は実装していません。 + +主な commit: +- `9a245403 mcp: execute stdio tool calls` +- `399a9d43 merge: mcp tools call` + +Review: +- r1 は `approve`。 +- Reviewer は permission-before-call、ordinary Tool result/history path、`isError` と protocol error の区別、bounded/untrusted result handling、out-of-scope surface が無いことを確認しました。 + +最終 validation: +- `cargo fmt --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp --test stdio_lifecycle` +- `cargo test -p pod feature::mcp` +- `cargo check -p mcp -p pod` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `113196368` + +Validation log: +- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-lkjYsX.log` \ No newline at end of file diff --git a/.yoi/tickets/00001KVHR3WSD/thread.md b/.yoi/tickets/00001KVHR3WSD/thread.md index 733cf1c1..c125abe0 100644 --- a/.yoi/tickets/00001KVHR3WSD/thread.md +++ b/.yoi/tickets/00001KVHR3WSD/thread.md @@ -259,3 +259,56 @@ Final state: Implementation was merged into Orchestrator branch at `399a9d43`, review approved, and final Orchestrator validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p mcp --test stdio_lifecycle`, `cargo test -p pod feature::mcp`, `cargo check -p mcp -p pod`, and `nix build .#yoi --no-link`. --- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +## Resolution + +`00001KVHR3WSD` を完了しました。 + +実装内容: +- MCP `tools/call` typed request/result/content types を追加しました。 +- `McpStdioClient::call_tool(...)` を追加しました。 +- MCP discovered tool の discovery-only stub を executable `McpStdioTool` に置き換えました。 +- Execution は configured stdio MCP server を spawn/initialize し、`tools/call` を送信して shutdown します。 +- Permission denial は ordinary Worker `PreToolCall` path により Tool execution 前に適用されるため、denied call は MCP server に送信されません。 +- Results は ordinary Tool result/history path を通ります。Hidden context injection はありません。 +- Normal MCP result、MCP `isError: true`、JSON-RPC protocol error を区別しました。 +- MCP content / structuredContent / `_meta` / rich output は untrusted data として bounded に serialization されます。 +- Image/audio data は raw payload を落とし、size metadata のみ残します。 +- Resources/read、prompts/get、list_changed、sampling、elicitation は実装していません。 + +主な commit: +- `9a245403 mcp: execute stdio tool calls` +- `399a9d43 merge: mcp tools call` + +Review: +- r1 は `approve`。 +- Reviewer は permission-before-call、ordinary Tool result/history path、`isError` と protocol error の区別、bounded/untrusted result handling、out-of-scope surface が無いことを確認しました。 + +最終 validation: +- `cargo fmt --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp --test stdio_lifecycle` +- `cargo test -p pod feature::mcp` +- `cargo check -p mcp -p pod` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `113196368` + +Validation log: +- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-lkjYsX.log` + +---