Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WebMCPを理解しよう

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for pawn pawn
March 03, 2026

 WebMCPを理解しよう

Avatar for pawn

pawn

March 03, 2026
Tweet

More Decks by pawn

Other Decks in Technology

Transcript

  1. <form toolname="sortReviews" tooldescription="レビュー 一覧を指定した順序に並び替えます"> ... <select name="sortValue"> <option value="default">標準</option> ...

    </select> </form> 実装方法1 HTMLで定義 この二つの属性を 追加する 選択肢が自動で候補 になる
  2. <form toolname="sortReviews" tooldescription="レビュー 一覧を指定した順序に並び替えます"> ... <select name="sortValue" toolparamtitle="Possible Options" toolparamdescription="A

    nice description"> <option value="default">標準</option> ... </select> </form> 実装方法1 HTMLで定義 選択肢の説明で 詳しく伝えることもで きる
  3. <form class="search-controls" toolautosubmit toolname="searchReviews" tooldescription="レビューをキーワー ドで検索・絞り込みます" > <input type="text" id="search-input"

    name="keyword" placeholder="レビューを検索..."> <button type="submit">検索</button> </form> 実装方法1 HTMLで定義 選択肢の説明で 詳しく伝えることもで きる
  4. const getProductReviewsTool = { name: "getProductReviews", description: "Retrieve customer names,

    ratings, dates, and review comments from the product page.", inputSchema: { 入力の定義 }, outputSchema: { 出力の定義 }, execute: async function (params) { 処理} } window.navigator.modelContext.registerTool(getProductReviewsTool); 実装方法2 JavaScriptで定義 入出力や処理内容な どを定義 関数を参照できるよう にする