{"openapi":"3.1.0","info":{"title":"webmcp.com Directory API","version":"1.0.0","description":"Read-only JSON API over the WebMCP Directory at webmcp.com. Use it to discover which websites expose WebMCP tools via navigator.modelContext, inspect each tool's JSON Schema, and probe an arbitrary URL to see whether it is WebMCP-enabled.","contact":{"name":"nekuda","url":"https://nekuda.ai"}},"servers":[{"url":"https://webmcp.com"}],"paths":{"/api/v1/sites":{"get":{"summary":"List WebMCP-enabled sites","description":"Returns directory entries. All query parameters are optional; combine them to narrow the list.","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["live","demo","all"]},"description":"Filter by site type."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Substring search across host, description, URL, and tool name/description."},{"name":"tool","in":"query","schema":{"type":"string"},"description":"Return only sites that expose a tool whose name contains this substring."},{"name":"kind","in":"query","schema":{"type":"string","enum":["read","write","action"]},"description":"Filter by tool kind. Repeat to OR (e.g. kind=read&kind=write)."},{"name":"impl","in":"query","schema":{"type":"string","enum":["imperative","declarative"]},"description":"Filter by tool implementation style."},{"name":"apiSurface","in":"query","schema":{"type":"string","enum":["spec","polyfill","mixed"]},"description":"Filter by which API surface the site uses to register tools. spec = WICG registerTool / declarative DOM only. polyfill = @mcp-b/webmcp-polyfill provideContext only. mixed = both. Repeat to OR."},{"name":"fields","in":"query","schema":{"type":"string","enum":["full","summary","minimal"]},"description":"Response shape: full (default, with JSON schemas), summary (tools without inputSchema), minimal (tools as name/kind/impl/description only)."},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteListResponse"}}}}}}},"/api/v1/sites/{host}":{"get":{"summary":"Get a single site by host","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteResponse"}}}},"404":{"description":"Not found"}}}},"/api/v1/sites/{host}/tools":{"get":{"summary":"List tools exposed by a site","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v1/sites/{host}/tools/{tool}":{"get":{"summary":"Get one tool definition including JSON schema","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string"}},{"name":"tool","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v1/tools":{"get":{"summary":"Flat search across every tool in the directory","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Substring search across tool name and description."},{"name":"kind","in":"query","schema":{"type":"string","enum":["read","write","action"]}},{"name":"impl","in":"query","schema":{"type":"string","enum":["imperative","declarative"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/lookup":{"get":{"summary":"Does this URL expose WebMCP tools?","description":"Pass either ?url=… (any page URL — host is extracted) or ?host=…. Returns supported:true with the full site entry if matched, otherwise supported:false. Path-scoped demos (e.g. /webmcp-tools/demos/*) are matched by URL prefix.","parameters":[{"name":"url","in":"query","schema":{"type":"string","format":"uri"},"description":"Any URL on the page being probed."},{"name":"host","in":"query","schema":{"type":"string"},"description":"Alternative to ?url=. www. is stripped before matching."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupResponse"}}}}}}},"/api/v1/stats":{"get":{"summary":"Aggregate counts across the directory","responses":{"200":{"description":"OK"}}}},"/api/directory.json":{"get":{"summary":"Legacy: full directory dump (no filters)","deprecated":false,"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Tool":{"type":"object","properties":{"name":{"type":"string","description":"Stable identifier the agent invokes."},"kind":{"type":"string","enum":["read","write","action"],"description":"read = no side effects, write = mutates page state, action = navigation/side-effectful task."},"impl":{"type":"string","enum":["imperative","declarative"],"description":"How the tool is registered — navigator.modelContext.registerTool (imperative) or a <tool> element (declarative)."},"description":{"type":"string"},"inputSchema":{"type":"object","description":"JSON Schema for the tool's input. Same shape as MCP/OpenAI function arguments."},"page":{"type":"string","description":"Optional page hint — relative path the tool typically runs on."}},"required":["name","kind","impl","description"]},"Site":{"type":"object","properties":{"host":{"type":"string","example":"store.nekuda.ai"},"url":{"type":"string","format":"uri"},"desc":{"type":"string"},"type":{"type":"string","enum":["live","demo"]},"apiSurface":{"type":"string","enum":["spec","polyfill","mixed"],"description":"Which API surface the site uses. spec = WICG registerTool / declarative DOM. polyfill = @mcp-b/webmcp-polyfill provideContext. mixed = both."},"toolCount":{"type":"integer"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}},"required":["host","url","type"]},"SiteListResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"integer","example":1},"count":{"type":"integer"},"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"sites":{"type":"array","items":{"$ref":"#/components/schemas/Site"}}}},"SiteResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"site":{"$ref":"#/components/schemas/Site"}}},"LookupResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"supported":{"type":"boolean","description":"true when the queried URL/host has WebMCP tools registered in this directory."},"host":{"type":"string"},"site":{"$ref":"#/components/schemas/Site"}}}}}}