You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, execute fires after the full args JSON is parsed. For tools with large text args (email bodies, code), it'd be nice to stream chunks into page UI as the model generates them. example from userland
navigator.modelContext.registerTool({name: "compose_email",stream: true,inputSchema: {/* to, subject, body */},execute: async(call)=>{composer.open();forawait(const{ key, chunk }ofcall){if(key==="to")composer.appendTo(chunk);if(key==="body")composer.appendBody(chunk);}const{ to, subject, body }=awaitcall.args;return{content: [{type: "text",text: `Draft created`}]};}});
For declarative tools this could be default behavior.
Reacted by François Beaufort, Dominic Farolino, Kenneth Rohde Christiansen and Alex Nahas
Here's a streaming demo running in a local Chromium fork with the proposed API:
WebMCP.stream.demo.mp4
navigator.modelContext.registerTool({name: 'compose_site',description: 'Stream HTML progressively into a live preview.',stream: true,inputSchema: {type: 'object',properties: {html: {type: 'string'}},required: ['html'],},asyncexecute(call){forawait(const{ key, chunk }ofcall){if(key==='html'){htmlBuffer+=chunk;preview.innerHTML=htmlBuffer;}}const{ html }=awaitcall.args;preview.innerHTML=html;return{content: [{type: 'text',text: 'Site composed.'}]};},});
I think this API would be a great way to show off what you can make with WebMCP and how it is different from MCP.
Activity
MiguelsPizza commentedon Mar 9, 2026
Here's a streaming demo running in a local Chromium fork with the proposed API:
WebMCP.stream.demo.mp4
I think this API would be a great way to show off what you can make with WebMCP and how it is different from MCP.