PLAIN/TEXT — ISSUE 393/456 COMPUTER SCIENCE · FOUNDATION / TOOL CALLING · ~4 MIN READING DATE: 2027-10-29 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: Why an AI tool request needs more than valid text Why an AI tool request needs more than valid text ================================================= / START HERE A booking form can look tidy while containing an impossible date or the wrong kind of value. Schema validation is checking a collection of named values, such as form fields, against explicit rules about its structure and allowed contents. For a computer-generated request to a booking program, those checks separate a plausible-looking proposal from data the receiving software can interpret. / WHY NOW A language model can propose arguments for a program to execute, such as a destination and passenger count. The proposal is not the action itself. The program needs to check the data, the requested operation and the user’s authority before anything consequential happens. / THE IDEA JSON is a common text format for named fields and values. Being valid JSON means the text can be parsed according to that format. A schema adds requirements: which fields must exist, what types they have, whether extra fields are allowed, and which values fall inside specified limits. These checks catch different mistakes. A field called passengers with the string "two" is valid JSON but fails a rule requiring an integer. An integer of minus two has the right type but fails a positive-range rule. Neither successful parsing nor successful schema validation establishes that a requested booking is authorised. / THE FORMAL IDEA accept proposal only if parse_ok AND schema_ok AND policy_ok - AND means every condition must pass. parse_ok checks readable structure; schema_ok checks declared data rules. - policy_ok stands for separate application checks such as permissions, availability and user confirmation. It is not a JSON Schema keyword. / RUN THE TINY EXAMPLE Change one thing. Predict what happens. Toy schema: passengers must be an integer from 1 to 4. Proposal {"passengers":"2"}: valid JSON, wrong value type → reject. Change only "2" to 2: {"passengers":2} passes this field rule. Change 2 to 20: type still fits, but the range check rejects it. Each decision follows a visible rule, not the confidence of the prose surrounding the proposal. The receiver can explain what failed and request correction without guessing whether a string should silently become a number. / SO WHAT? Define strict inputs at the boundary and handle rejected proposals as expected outcomes. Check units, identifiers and cross-field relationships in application logic when the schema cannot express them conveniently. A model may also select a real but inappropriate account or date that passes every structural rule, so semantic checks remain necessary. / ONE CAVEAT The example validates one field, not a booking system. A schema cannot itself guarantee truthful values, correct intent, safe execution or permission. Some generation systems constrain structure, but receiving software should still enforce its own contract. / KEEP THIS A well-formed tool request is only a proposal; structural validity and permission are separate gates. / SOURCE TRAIL [1] JSON Schema — Object validation https://json-schema.org/understanding-json-schema/reference/object [2] JSON Schema — Numeric validation https://json-schema.org/understanding-json-schema/reference/numeric NEXT: Two electrical noise sources respond to different fixes --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/10/2027-10-29-tool-schema-validation.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click