2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill web-mcp- _meta.json266 B
- SKILL.md8.9 KB
Overview
This skill enables AI agents to interact with Next.js/React web applications through a structured tool interface implementing the WebMCP standard. It exposes self-documented tools with JSON Schemas, event-bridge execution, and contextual registration so agents can call functionality reliably. Use it to add agent-accessible capabilities or to convert brittle scraping into robust tool calls.
How this skill works
The skill registers named tools on component mount and unregisters them on unmount, making only relevant tools visible to agents. Each tool includes input and output JSON Schemas, an execute function, and optional annotations; agent calls dispatch CustomEvents that trigger React handlers and signal completion back to the agent. A small client library and hook coordinate registration, event dispatch, and completion signaling, supporting read-only and mutating tools and handling timeouts and errors.
When to use it
- Making a web app directly callable by AI agents instead of relying on scraping or DOM hacks
- Adding AI agent capabilities to an existing Next.js/React project
- Building tool-based interfaces for agents (search, cart, dashboard widgets, etc.)
- Scoping tool exposure to specific pages or components via contextual loading
- Creating reproducible, schema-driven contracts between agents and your frontend
Best practices
- Use clear camelCase action names (e.g., searchProducts, addToCart) and concise descriptions
- Define complete JSON Schemas with parameter descriptions and required fields
- Register tools only when the related UI is mounted to limit agent access and provide accurate context
- Annotate tools to indicate read-only vs mutating behavior and to give helpful hints to agents
- Implement robust error handling and timeouts in execute() to avoid hanging agent calls
Example use cases
- E‑commerce: expose productSearch, viewCart, addToCart, and checkout tools for a shopping assistant agent
- Dashboard: provide filter, export, and refresh tools so agents can manipulate widgets and datasets
- Blog: expose articleSearch, postComment, and setFilters for content discovery and moderation agents
- Support flows: create tools for order tracking and status updates that agents can call directly
FAQ
WebMCP relies on CustomEvent and navigator.modelContext. Use the provided polyfill during development to support older browsers.
How do I keep tools secure?
Register tools only when the relevant UI is mounted, mark mutating tools clearly in annotations, and enforce server-side authorization for any sensitive operations triggered by tool calls.