function schemaContractFigure(host) { ensureStyles(); var shell = document.createElement('div'); shell.className = 'mf-shell'; shell.innerHTML = [ '
The Schema Contract one gate, two ways out
', '
', '', '', '', '', 'tool: lookup_product', 'inputSchema: sku required', 'outputSchema: 4 fields', 'extra properties: refused', '', 'arguments: {"sku": "X"}', '', '', '', 'validate()', '', '', 'result isError: true', '', '', 'name: "delete_catalog"', 'not in tools/list', '', '', 'error -32602 Invalid params', '', 'handler(arguments)', '', '', 'structuredContent: {...}', 'content[0].text: same JSON', '', '
', '
A schema failure inside a known tool comes back as a normal result with isError true, content the model can read and correct. A tool name the server never advertised comes back as a JSON-RPC protocol error instead, on a separate path that never reaches the handler.
' ].join(''); host.appendChild(shell); } // register as: mcpa-08-schema-contract