PageSourceSearch

https://ucpplayground.com/build/assets/SchemaQuality-DmkoZKtl.js

js ucpplayground.com collected 2026-10-02 00:58:36 UTC 4,438 bytes, 1 lines download raw bytes

1import{H as s}from"./HelpCallout-DZ-rcUed.js";import{d as o,c as d,o as n,e as a,a as i,w as h,b as t,i as r}from"./app-BsfAxaQK.js";const u=o({__name:"SchemaQuality",setup(c){return(l,e)=>(n(),d("div",null,[e[1]||(e[1]=a('<h1>Schema Quality</h1><p class="lead">Seven weighted checks that grade how well a target&#39;s tool schemas guide a model — scored 0–100 and graded A–F, per tool and overall.</p><p>A model can only shop as well as the schemas let it. When a tool ships without <code>required</code> fields, a model guesses which parameters are mandatory; when a parameter has no description, the model invents its meaning. Most &quot;the agent did something weird&quot; sessions trace back to a schema that left the model guessing. Schema quality measures exactly that guidance, before a model ever runs.</p><h2>The seven checks</h2><p>Each tool&#39;s <code>inputSchema</code> is scored against seven checks. Checks that cover multiple parameters award partial credit proportionally — three of four parameters documented earns three quarters of that check&#39;s points.</p><table><thead><tr><th>Check</th><th>Points</th><th>Why it matters</th></tr></thead><tbody><tr><td>Has an <code>inputSchema</code></td><td>10</td><td>Without one, models may send arbitrary parameters. No schema stops scoring here.</td></tr><tr><td>Has properties</td><td>15</td><td>An empty schema tells the model nothing about what to send.</td></tr><tr><td>Declares <code>required</code> fields</td><td>10</td><td>Models won&#39;t know which parameters are mandatory.</td></tr><tr><td>Every property has a description</td><td>20</td><td>The heaviest check — descriptions are the single strongest lever on model behaviour.</td></tr><tr><td>Every property has an explicit type</td><td>15</td><td>Untyped parameters invite wrong shapes.</td></tr><tr><td>Array properties define <code>items</code></td><td>15</td><td>Without <code>items</code>, models can&#39;t know what goes inside the array.</td></tr><tr><td>Object properties define nested properties</td><td>15</td><td>An object with no declared structure is a guess the model has to make.</td></tr></tbody></table><h2>Grades</h2><table><thead><tr><th>Grade</th><th>Score</th></tr></thead><tbody><tr><td>A</td><td>90–100</td></tr><tr><td>B</td><td>75–89</td></tr><tr><td>C</td><td>60–74</td></tr><tr><td>D</td><td>40–59</td></tr><tr><td>F</td><td>0–39</td></tr></tbody></table><p>The overall grade is the average of the per-tool scores. Every reported issue names the exact parameters involved, so the readout doubles as the fix list.</p>',9)),i(s,{type:"info"},{default:h(()=>[...e[0]||(e[0]=[t("p",null,[r("The same grader runs in the "),t("a",{href:"/docs/test-a-store/inspector"},"Inspector"),r(", in the "),t("a",{href:"/docs/test-a-store/agent-runs"},"Agent rail"),r("'s Schema Quality panel (overall grade plus per-tool grades and issues, live for the connected session), on the Conformance page, and in the "),t("a",{href:"/docs/automate/api-quickstart"},"API"),r(" — one tool list grades identically everywhere. Schema quality is a measured fact about the target's published schemas, not a judgement of the store. It grades UCP tools; the tools a store's page registers ("),t("a",{href:"/docs/test-a-store/webmcp"},"WebMCP"),r(") get findings in the Inspector, not grades.")],-1)])]),_:1}),e[2]||(e[2]=a('<h2>Why letter grades here and not elsewhere</h2><p>Schema quality is a weighted scorecard over many small criteria — the shape where letter grades are honest (the same reason TLS scanners grade configurations A–F). Behavioural questions with a small set of distinct outcomes, like <a href="/docs/conformance/identity-enforcement">identity enforcement</a>, get words instead: a grade on a yes/no question would read as certification, which the Playground doesn&#39;t do.</p><h2>Improving a grade</h2><ol><li><strong>Add <code>required</code></strong> — the most common miss, and cheap to fix.</li><li><strong>Describe every parameter</strong> — write for a model that has never seen your store: units, formats, allowed values.</li><li><strong>Type everything, including array <code>items</code> and nested object properties</strong>
1 — the deep structure is where models invent shapes.</li><li><strong>Re-run the Inspector after each change</strong> — the loop is edit → reconnect → re-grade; nothing is cached.</li></ol>',4))]))}});export{u as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.