WebMCP Is Now Available for Early Preview: Revolutionizing AI-Web Interaction
March 2, 2026by Ichiban Team
webmcpaiweb-standardschromemcp

इस model में, AI agent को यह अनुमान लगाने की ज़रूरत नहीं है कि कौन सा input field search query से मेल खाता है। Metadata स्पष्ट रूप से SearchArticles tool और उसके required parameter query को define करता है।
#The Imperative API
अधिक complex, highly dynamic interactions के लिए जिन्हें JavaScript execution या asynchronous state management की आवश्यकता होती है, WebMCP Imperative API प्रदान करता है। यह API developers को ऐसे custom JavaScript functions register करने की अनुमति देता है जिन्हें agents सीधे invoke कर सकते हैं।
// Example of an Imperative WebMCP Tool Registration
if ('webMCP' in navigator) {
navigator.webMCP.registerTool({
name: 'fetchCurrentStock',
description: 'Fetches real-time inventory for a given product ID.',
parameters: {
type: 'object',
properties: {
productId: { type: 'string' }
},
required: ['productId']
},
execute: async (params) => {
const response = await fetch(`/api/inventory/${params.productId}`);
return await response.json();
}
});
}