{
  "schemaVersion": "1.0",
  "item": {
    "slug": "webmcp",
    "name": "WebMCP",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "canonicalUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/webmcp",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=webmcp",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/webmcp"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/webmcp",
    "agentPageUrl": "https://openagent3.xyz/skills/webmcp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/webmcp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/webmcp/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "What is WebMCP",
        "body": "WebMCP is a browser API that lets websites expose JavaScript functions as structured tools for AI agents. Pages register tools via window.navigator.modelContext, each with a name, description, JSON Schema input, and an execute callback. Think of it as an MCP server running inside the web page itself.\n\nSpec: https://github.com/webmachinelearning/webmcp"
      },
      {
        "title": "Detecting WebMCP Support",
        "body": "Before interacting with tools, check whether the current page supports WebMCP:\n\nconst supported = \"modelContext\" in window.navigator;\n\nIf false, the page does not expose WebMCP tools — fall back to DOM interaction or actuation."
      },
      {
        "title": "Discovering Available Tools",
        "body": "Tools are registered by the page via provideContext() or registerTool(). The browser mediates access. To list available tools from an agent's perspective, evaluate:\n\n// Browser-specific — the exact discovery API depends on the agent runtime.\n// Typically the browser exposes registered tools to connected agents automatically.\n// From page-script perspective, tools are registered like this:\nwindow.navigator.modelContext.provideContext({\n  tools: [\n    {\n      name: \"tool-name\",\n      description: \"What this tool does\",\n      inputSchema: { type: \"object\", properties: { /* ... */ }, required: [] },\n      execute: (params, agent) => { /* ... */ }\n    }\n  ]\n});\n\nKey points:\n\nEach tool has name, description, inputSchema (JSON Schema), and execute.\nprovideContext() replaces all previously registered tools (useful for SPA state changes).\nregisterTool() / unregisterTool() add/remove individual tools without resetting.\nTools may change as the user navigates or as SPA state updates — re-check after page transitions."
      },
      {
        "title": "Tool Schema Format",
        "body": "Tool input schemas follow JSON Schema (aligned with MCP SDK and Prompt API tool use):\n\n{\n  name: \"add-stamp\",\n  description: \"Add a new stamp to the collection\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      name: { type: \"string\", description: \"The name of the stamp\" },\n      year: { type: \"number\", description: \"Year the stamp was issued\" },\n      imageUrl: { type: \"string\", description: \"Optional image URL\" }\n    },\n    required: [\"name\", \"year\"]\n  },\n  execute({ name, year, imageUrl }, agent) {\n    // Implementation — updates UI and app state\n    return {\n      content: [{ type: \"text\", text: `Stamp \"${name}\" added.` }]\n    };\n  }\n}"
      },
      {
        "title": "Invoking Tools",
        "body": "When connected as an agent, send a tool call by name with parameters matching inputSchema. The execute callback runs on the page's main thread, can update the UI, and returns a structured response:\n\n// Response format from execute():\n{\n  content: [\n    { type: \"text\", text: \"Result description\" }\n  ]\n}\n\nTools run sequentially on the main thread (one at a time).\nexecute may be async (returns a Promise).\nThe second parameter agent provides agent.requestUserInteraction() for user confirmation flows."
      },
      {
        "title": "User Interaction During Tool Execution",
        "body": "Tools can request user confirmation before sensitive actions:\n\nasync function buyProduct({ product_id }, agent) {\n  const confirmed = await agent.requestUserInteraction(async () => {\n    return confirm(`Buy product ${product_id}?`);\n  });\n  if (!confirmed) throw new Error(\"Cancelled by user.\");\n  executePurchase(product_id);\n  return { content: [{ type: \"text\", text: `Product ${product_id} purchased.` }] };\n}\n\nAlways respect user denials — do not retry cancelled tool calls."
      },
      {
        "title": "Agent Workflow",
        "body": "Navigate to the target website.\nCheck \"modelContext\" in window.navigator to confirm WebMCP support.\nDiscover registered tools (names, descriptions, schemas).\nSelect the appropriate tool based on the user's goal and the tool description.\nInvoke with correct parameters matching inputSchema.\nRead the structured response and relay results to the user.\nAfter SPA navigation or state changes, re-discover tools — the set may have changed.\nIf no WebMCP tool fits the task, fall back to DOM-based interaction."
      },
      {
        "title": "Important Constraints",
        "body": "Browser context required — tools only exist in a live browsing context (tab/webview), not headlessly.\nSequential execution — tool calls run one at a time on the main thread.\nNo cross-origin tool sharing — tools are scoped to the page that registered them.\nPermission-gated — the browser may prompt the user before allowing tool access.\nTools are dynamic — SPAs may register/unregister tools based on UI state."
      }
    ],
    "body": "WebMCP — Discover and Use Website Tools\nWhat is WebMCP\n\nWebMCP is a browser API that lets websites expose JavaScript functions as structured tools for AI agents. Pages register tools via window.navigator.modelContext, each with a name, description, JSON Schema input, and an execute callback. Think of it as an MCP server running inside the web page itself.\n\nSpec: https://github.com/webmachinelearning/webmcp\n\nDetecting WebMCP Support\n\nBefore interacting with tools, check whether the current page supports WebMCP:\n\nconst supported = \"modelContext\" in window.navigator;\n\n\nIf false, the page does not expose WebMCP tools — fall back to DOM interaction or actuation.\n\nDiscovering Available Tools\n\nTools are registered by the page via provideContext() or registerTool(). The browser mediates access. To list available tools from an agent's perspective, evaluate:\n\n// Browser-specific — the exact discovery API depends on the agent runtime.\n// Typically the browser exposes registered tools to connected agents automatically.\n// From page-script perspective, tools are registered like this:\nwindow.navigator.modelContext.provideContext({\n  tools: [\n    {\n      name: \"tool-name\",\n      description: \"What this tool does\",\n      inputSchema: { type: \"object\", properties: { /* ... */ }, required: [] },\n      execute: (params, agent) => { /* ... */ }\n    }\n  ]\n});\n\n\nKey points:\n\nEach tool has name, description, inputSchema (JSON Schema), and execute.\nprovideContext() replaces all previously registered tools (useful for SPA state changes).\nregisterTool() / unregisterTool() add/remove individual tools without resetting.\nTools may change as the user navigates or as SPA state updates — re-check after page transitions.\nTool Schema Format\n\nTool input schemas follow JSON Schema (aligned with MCP SDK and Prompt API tool use):\n\n{\n  name: \"add-stamp\",\n  description: \"Add a new stamp to the collection\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      name: { type: \"string\", description: \"The name of the stamp\" },\n      year: { type: \"number\", description: \"Year the stamp was issued\" },\n      imageUrl: { type: \"string\", description: \"Optional image URL\" }\n    },\n    required: [\"name\", \"year\"]\n  },\n  execute({ name, year, imageUrl }, agent) {\n    // Implementation — updates UI and app state\n    return {\n      content: [{ type: \"text\", text: `Stamp \"${name}\" added.` }]\n    };\n  }\n}\n\nInvoking Tools\n\nWhen connected as an agent, send a tool call by name with parameters matching inputSchema. The execute callback runs on the page's main thread, can update the UI, and returns a structured response:\n\n// Response format from execute():\n{\n  content: [\n    { type: \"text\", text: \"Result description\" }\n  ]\n}\n\nTools run sequentially on the main thread (one at a time).\nexecute may be async (returns a Promise).\nThe second parameter agent provides agent.requestUserInteraction() for user confirmation flows.\nUser Interaction During Tool Execution\n\nTools can request user confirmation before sensitive actions:\n\nasync function buyProduct({ product_id }, agent) {\n  const confirmed = await agent.requestUserInteraction(async () => {\n    return confirm(`Buy product ${product_id}?`);\n  });\n  if (!confirmed) throw new Error(\"Cancelled by user.\");\n  executePurchase(product_id);\n  return { content: [{ type: \"text\", text: `Product ${product_id} purchased.` }] };\n}\n\n\nAlways respect user denials — do not retry cancelled tool calls.\n\nAgent Workflow\nNavigate to the target website.\nCheck \"modelContext\" in window.navigator to confirm WebMCP support.\nDiscover registered tools (names, descriptions, schemas).\nSelect the appropriate tool based on the user's goal and the tool description.\nInvoke with correct parameters matching inputSchema.\nRead the structured response and relay results to the user.\nAfter SPA navigation or state changes, re-discover tools — the set may have changed.\nIf no WebMCP tool fits the task, fall back to DOM-based interaction.\nImportant Constraints\nBrowser context required — tools only exist in a live browsing context (tab/webview), not headlessly.\nSequential execution — tool calls run one at a time on the main thread.\nNo cross-origin tool sharing — tools are scoped to the page that registered them.\nPermission-gated — the browser may prompt the user before allowing tool access.\nTools are dynamic — SPAs may register/unregister tools based on UI state."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "publisherUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "owner": "brunobuddy",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/webmcp",
    "downloadUrl": "https://openagent3.xyz/downloads/webmcp",
    "agentUrl": "https://openagent3.xyz/skills/webmcp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/webmcp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/webmcp/agent.md"
  }
}