mcp-tool

SI Readiness by MCP-Tool

document.modelContext is in use

Does the page register WebMCP tools at all?

Why it matters

This is the difference between an agent inferring your interface and calling it. Registered tools turn a page into a small, documented API that the visitor's own assistant can operate — without you hosting a server or handing out keys.

How to fix it

Register your two or three most valuable actions as tools with document.modelContext.registerTool. Start read-only. The polyfill lets you ship before the browser support is universal.

await document.modelContext.registerTool({
  name: "search_products",
  description: "Search the catalog by free text and optional filters.",
  inputSchema: {
    type: "object",
    properties: { query: { type: "string", description: "Free-text search term" } },
    required: ["query"],
  },
  annotations: { readOnlyHint: true },
  execute: async ({ query }, { signal }) => {
    const res = await fetch(`/api/search?q=${encodeURIComponent(query)}`, {
      credentials: "same-origin",
      signal,
    });
    return { content: [{ type: "text", text: JSON.stringify(await res.json()) }] };
  },
});

Run a check · Full method