{"id":"form-compare","version":"1.0.0","description":"Compare two filled form snapshots and return compact field and answer changes.","supported_operations":["compare filled forms","form snapshot diff"],"unsupported_operations":["fuzzy matching","html extraction","pdf or ocr","silent answer merge"],"semantics":["Each snapshot carries its own fields and answers. Fields are diffed by exact id.","Answers use the shared precedence only when both fields exist, the types are equal, and choice or multi sets contain the same strings.","If the type or choice set differs, a non-missing answer is incomparable, even when a side is invalid for its own type. Choice order alone does not.","A one-sided field adds or removes an answer only for null or a valid value. An invalid value stays invalid and is not added or removed.","Both nulls compare equal and are unchanged. That is comparison equality, not validation. multi order-only changes are not value changes.","Top-level counts repeat the nested field and answer counts. Nothing is truncated; over-budget output is rejected."],"limits":{"max_input_bytes":262144,"max_output_bytes":262144,"max_input_depth":16,"max_input_nodes":20000,"max_fields":100,"max_choices":50,"max_respondents":100,"max_id_bytes":128,"max_label_bytes":256,"max_choice_bytes":128,"max_answer_string_bytes":4096,"max_answer_depth":6,"max_answer_nodes":50,"max_changes":500,"max_mapping":100},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["left","right"],"properties":{"left":{"type":"object","additionalProperties":false,"required":["fields","answers"],"properties":{"fields":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["id","label","type","required"],"properties":{"id":{"type":"string","minLength":1},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","integer","boolean","choice","multi","json"]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50}}}},"answers":{"type":"object"}}},"right":{"type":"object","additionalProperties":false,"required":["fields","answers"],"properties":{"fields":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["id","label","type","required"],"properties":{"id":{"type":"string","minLength":1},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","integer","boolean","choice","multi","json"]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50}}}},"answers":{"type":"object"}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["fields","answers","counts"],"properties":{"fields":{"type":"object"},"answers":{"type":"object"},"counts":{"type":"object"}}},"examples":[{"input":{"left":{"fields":[{"id":"email","label":"Email","type":"string","required":true},{"id":"name","label":"Name","type":"string","required":true}],"answers":{"email":"a@b.test","name":"Ada"}},"right":{"fields":[{"id":"name","label":"Full name","type":"string","required":true},{"id":"role","label":"Role","type":"choice","required":true,"choices":["admin","member"]}],"answers":{"name":"Ada Lovelace","role":"admin"}}},"output":{"fields":{"added":[{"id":"role","field":{"id":"role","label":"Role","type":"choice","required":true,"choices":["admin","member"]}}],"removed":[{"id":"email","field":{"id":"email","label":"Email","type":"string","required":true}}],"changed":[{"id":"name","changes":["label"],"left":{"id":"name","label":"Name","type":"string","required":true},"right":{"id":"name","label":"Full name","type":"string","required":true}}],"order_changed":false,"counts":{"added":1,"removed":1,"changed":1,"unchanged":0,"reordered":0}},"answers":{"added":[{"id":"role","presence":"value","value":"admin"}],"removed":[{"id":"email","presence":"value","value":"a@b.test"}],"changed":[{"id":"name","reason":"value","left_presence":"value","right_presence":"value","left":"Ada","right":"Ada Lovelace"}],"invalid":[],"order_only":[],"incomparable":[],"unknown":[],"counts":{"added":1,"removed":1,"changed":1,"invalid":0,"order_only":0,"incomparable":0,"unknown":0,"unchanged":0,"fields":3,"left_missing":1,"left_null":0,"left_empty":0,"right_missing":1,"right_null":0,"right_empty":0}},"counts":{"fields_added":1,"fields_removed":1,"fields_changed":1,"fields_unchanged":0,"fields_reordered":0,"answers_added":1,"answers_removed":1,"answers_changed":1,"answers_invalid":0,"answers_order_only":0,"answers_incomparable":0,"answers_unknown":0,"answers_unchanged":0}}}],"execute_url":"/v1/tools/form-compare/versions/1.0.0/execute"}