WebMCP tool execution progress report
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript
Hướng nghiên cứu
Start with the linked Chromium change, the extension inspector PR, and the current ToolExecuteCallback and document.modelContext definitions. Compare the proposed event-target API with the alternative ExecuteToolOptions.monitor, especially how concurrent executions receive identifiers. Done means selecting and specifying one API shape, including progress-event fields and execution-ID behavior, then updating the WebMCP specification and examples consistently.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Introduction & Objectives
As Language Models and Agentic workflows become deeply integrated into the web platform via WebMCP, some tools registered by web applications may be tasked with long-running operations (e.g., repository indexing, complex multi-file analyses). Currently, the ToolExecuteCallback interface executes asynchronously but behaves as a "black box" until the final promise resolves or rejects. There is no native mechanism for an active tool execution to stream intermediate telemetry, status messages, or sub-task heartbeats back to the calling agent, which leaves both the agent and the user without visibility into the tool's current state.
Better agent to agent integrations
A common agentic pattern is to expose sub-agents to a coordinator as tools. This pattern also enables websites to expose their own agents to browser agents. Similar to other tasks described in this document, invoking a sub-agent can be a long running process. The progress report feature would enable sub-agents to send progress updates: thinking blocks, partial texts, and details on their own tool calls to the browser agent, so it can display their content to the user.
[!NOTE]
While it’s up to the agent to decide how to use the progress reports it receives, the goal is to use the information to show progress of the tool call to the user, and the content of those reports should not be included in the conversation between agents, to avoid context bloat.
Proposed API changes
partial interface ModelContextClient {
undefined reportProgress(DOMString message);
};
interface ToolProgressEvent : Event {
constructor(DOMString type, optional ToolProgressEventInit eventInitDict = {});
readonly attribute DOMString toolName;
readonly attribute DOMString message;
};
dictionary ToolProgressEventInit : EventInit {
DOMString toolName = "";
DOMString message = "";
};
partial interface ModelContext : EventTarget {
attribute EventHandler ontoolprogress;
};
JavaScript example
// 1. Tool Implementation with Progress Updates
async function* runTasks() {
yield { type: 'thinking', text: 'Analyzing your workspace...' };
await new Promise((r) => setTimeout(r, 800));
yield { type: 'tool_start', name: 'hackathon-analyzer', params: { file: 'reasons.md' } };
await new Promise((r) => setTimeout(r, 1200));
yield { type: 'tool_finish', name: 'hackathon-analyzer' };
await new Promise((r) => setTimeout(r, 500));
yield { type: 'text', text: 'Analysis complete! Found 3 migration reasons.' };
}
// 2. Registering the Tool with the injected client
document.modelContext.registerTool({
name: 'workspace-analyzer',
description: 'Analyzes files in the current workspace directory',
execute: async (input, client) => {
for await (const message of runTasks()) {
// Serialize updates to string data
client.reportProgress(JSON.stringify(message));
}
return { success: true };
},
});
// 3. Orchestrator observing runtime progress hooks
document.modelContext.ontoolprogress = (event) => {
const { toolName, message } = event;
const data = JSON.parse(message);
console.log(`[Progress Update] Tool: ${toolName}`, data);
};
Resources
- Progress - Model Context Protocol spec: https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/progress
- Chromium CL: [WebMCP] Add ModelContextClient to send tool progress events
- Extension PR: https://github.com/beaufortfrancois/model-context-tool-inspector/pull/19
- WebMCP Text Editor PR: https://github.com/andreban/webmcp-text-editor/pull/3
Open questions
A key challenge remains: determining how an extension can effectively track concurrent tool executions. Tool execution IDs are currently unavailable until executeTool() completes, which complicates parallel monitoring. Shall we introduce a new monitor object in ExecuteToolOptions instead of document.modelContext.ontoolprogress to report progress?
const result = await document.modelContext.executeTool(myTool, {
monitor(m) {
m.addEventListener('progress', ({ message }) => {
// Report progress to the extension sidebar
chrome.runtime.sendMessage({
toolExecutionId: m.toolExecutionId,
toolName: m.toolName,
message,
});
});
},
});
// Report final result from tool execution.
chrome.runtime.sendMessage({ result });
- Ngôn ngữ chính
- Bikeshed
- Star
- 4.7k
- Fork
- 328
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webmachinelearning/webmcp
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
webmachinelearning/webmcp#360 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Say how an agent should weigh annotations that the page wrote about itselfCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
webmachinelearning/webmcp#353 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
webmachinelearning/webmcp#343 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Agenda+ i18n-tracker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
webmachinelearning/webmcp#273 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y-tracker Agenda+
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
webmachinelearning/webmcp#272 · 4 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của webmachinelearning/webmcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
abhigyanpatwari/GitNexus#3704 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-generated
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0.3.4 bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug message-history parked:no-user-report pkg:core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pydantic/pydantic-ai#11180 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
google_ai: Model picker displays shut-down and sunset models (3.1 Flash Lite Preview, 3.7 Flash, 3.5 FlashCó thể đã có người làm @LorenzoBiassio đã nhận hôm nay. Đang mởstate:needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zed-industries/zed#66054 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày