Skip to content

WebMCP Interface Semantics: Clarification and Potential Alignment with Agent IDL #103

@hychen

Description

@hychen

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:

  1. explicit capability interfaces
  2. structured input/output contracts
  3. machine-readable, composable agent behaviors
  4. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions