Back to Blog

WebMCP Is Now Available for Early Preview: Revolutionizing AI-Web Interaction

March 2, 2026by Ichiban Team
webmcpaiweb-standardschromemcp

Hero

このモデルでは、AIエージェントはどの入力フィールドが検索クエリに対応するかを推測する必要がない。メタデータが、SearchArticlesというツールと必須パラメータであるqueryを明示的に定義しているからだ。

#Imperative API

JavaScriptの実行や非同期の状態管理を必要とする、より複雑で高度に動的なインタラクションのために、WebMCPはImperative APIを提供している。このAPIにより、開発者はエージェントが直接呼び出すことができるカスタムJavaScript関数を登録できる。

// 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();
    }
  });
}