Make 9bot discoverable through WebMCP.

The public website exposes safe browser tools through both the Declarative and Imperative WebMCP APIs. They help agents understand 9bot and open public resources without accessing tenant data.

Declarative API

A standard visible form becomes a browser-agent tool through semantic attributes. The 9bot resource form uses toolname, tooldescription, toolparamdescription, and toolautosubmit.

<form
  toolname="explore_9bot_developer_resource"
  tooldescription="Selects and opens a public 9bot developer resource."
  toolautosubmit>

  <label for="resource">Explore a resource</label>
  <select id="resource" name="resource" required
    toolparamdescription="The public 9bot resource to open.">
    <option value="developers">Developer documentation</option>
    <option value="openapi">OpenAPI specification</option>
    <option value="mcp">MCP documentation</option>
  </select>

  <button type="submit">Open selected resource</button>
</form>

Imperative API

The public JavaScript checks for document.modelContext.registerTool and registers two focused, read-only tools:

  • get_9bot_capabilities returns structured public capability information.
  • open_9bot_resource opens developer documentation, OpenAPI, MCP, WebMCP, authentication, or the trial page.
await document.modelContext.registerTool({
  name: 'get_9bot_capabilities',
  description: 'Returns a structured, read-only summary of 9bot capabilities.',
  inputSchema: {
    type: 'object',
    properties: {
      category: { type: 'string' }
    }
  },
  execute: async ({ category = 'all' } = {}) => {
    // Return public capability information.
  }
});

Safety boundary

The website's WebMCP tools do not send WhatsApp messages, modify tenant settings, read private groups, or bypass OAuth. Operational access belongs to the authenticated MCP server.

Progressive enhancement

Browsers without WebMCP use the same interface as normal HTML and JavaScript. Unsupported experimental APIs are detected safely and do not generate user-facing errors.

Testing

  1. Load the 9bot home page or this page in a WebMCP-enabled browser build.
  2. Confirm that the declarative form appears as a registered tool.
  3. Confirm that get_9bot_capabilities and open_9bot_resource appear as imperative tools.
  4. Run the current Lighthouse agentic browsing audit and inspect registered WebMCP tools.
  5. Verify that a normal browser without WebMCP has no console errors and the form still works.
Important: keep the script and visible form loaded on the public home page. A tool available only after login or after a user gesture may not be discoverable by public crawlers.