v149 · WebMCP · tooling

Schema Validator

Paste or edit an MCP tool definition in JSON. The validator checks every required field, warns about missing recommendations, and shows how an AI agent will interpret your schema — before you register it in the origin trial.

Origin Trial (Chrome 149–156): navigator.modelContext requires an OT token. This tool validates schema structure offline — no token needed.
Tool schema (JSON) 0 B
Load an example:
Validation results
Paste a schema and click Validate.
Agent preview (what the model sees)
// Validate a schema to see the agent preview
// A valid MCP tool definition has three required top-level fields:
const weatherTool = {
  name: "get_current_weather",          // required: snake_case identifier
  description: "Get current weather conditions for a location.", // required
  inputSchema: {                         // required: JSON Schema object
    type: "object",
    properties: {
      location: {
        type: "string",
        description: "City name or lat,lng coordinates",
      },
      unit: {
        type: "string",
        enum: ["celsius", "fahrenheit"],
      },
    },
    required: ["location"],
  },
};

// Register with the WebMCP API (Chrome 149+, OT token required):
navigator.modelContext.registerTool(weatherTool, async (args) => {
  const data = await fetchWeather(args.location, args.unit);
  return { temperature: data.temp, condition: data.sky };
});

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗