-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Summary
WebMCP introduces a browser-native mechanism for exposing tools to AI agents. While the API surface is simple and flexible, the current interface definition lacks a clear semantic contract layer.
This raises questions about interoperability, consistency, and alignment with emerging agent interface definition efforts such as Agent IDL.
This issue proposes clarifying the intended role of WebMCP interfaces and explores whether alignment with an IDL-based approach should be considered.
Problem Statement
The current registerTool() pattern allows arbitrary tool definitions:
navigator.modelContext.registerTool({
name: "approveInvoice",
inputSchema: { ... },
handler: async (...) => { ... }
})
However, the following aspects are not clearly defined:
Whether inputSchema represents a strict interface contract or a model hint
How semantic equivalence across tools is established
How tools can be reused, versioned, or composed across sites
How agents can reliably interpret capabilities beyond natural language descriptions
As a result, WebMCP risks becoming syntactically consistent but semantically fragmented across implementations
Relevance of Agent IDL
The Agent IDL effort (within W3C CG discussions) aims to define:
- explicit capability interfaces
- structured input/output contracts
- machine-readable, composable agent behaviors
- alignment with delegation and verifiable execution models
This introduces a potential layering:
Agent IDL (semantic interface definition)
↓
WebMCP (browser exposure of tools)
↓
Agent runtime (execution)
For reference, here is the PoC: https://github.com/s-agent-comm/agent-idl
While the ontology layer describes what an agent is (roles, capabilities, contracts, etc.), AgentIDL defines how an agent acts and speaks. It serves as a "Semantic API" that Ontology (meaning) + Grammar (syntax) + Protocol (execution).
This creates an agent-level Application Behavior Interface (ABI).