Schema Ambiguity Report
schema.detect_schema_ambiguity
Overview
You send a JSON Schema and we walk it against nine published rules — a missing or threadbare description, a name off our generic-name list, an object or an array with nothing constraining it, a union broad enough to be a guess, a set of object branches with no property telling them apart, a name that disagrees with its own title and description, and two members of the same block that read the same. Each finding comes back with a rule code, a JSON Pointer and the parameters the rule ran under, so a report is reproducible. The answer means issues detected under the named rule profile, and nothing stronger: a clean result is not proof an agent will choose correctly, and a warning is not proof anyone was confused.
A tool schema is the only thing an agent reads before it decides what to send, and the fields that go wrong are the ones nobody described, nobody bounded, or named twice in two ways. Reading for that by hand does not scale past a handful of contracts.
Reliability
The same schema and the same rule settings always produce the same findings in the same order, independent of your machine's locale, time zone and default character set. Word splitting folds case with the root locale on purpose, so a Turkish system agrees with an English one. AMB-009 scores two sibling names with the platform's shared similarity implementation: names that normalise identically always count, and under JARO_WINKLER a pair also counts when its score reaches nameSimilarityThreshold, so raising the threshold reports less and lowering it reports more. Eleven refusals stop the call and an unchanged retry will not help. AMBIGUITY_SCHEMA_INVALID means schema is absent, is not an object, or holds a reference to a location that is not in the document — send a well-formed schema; AMBIGUITY_SCHEMA_TOO_LARGE means the schema is over 262144 bytes, so split it or inspect one part at a time; AMBIGUITY_RULE_UNKNOWN means rules.enabled names a code outside AMB-001 to AMB-009, so correct the list rather than expecting it to be skipped; AMBIGUITY_RULE_PARAMETER_INVALID means a threshold is outside its published range, so bring it back inside; AMBIGUITY_SEVERITY_UNSUPPORTED means minSeverity is not INFO, WARNING or ERROR, so pick one of the three; AMBIGUITY_NODE_LIMIT_EXCEEDED means the schema has over 20000 nodes, nests deeper than 64 levels, breaks a per-object cap, or would pass 100000 nodes once its local references were expanded, so simplify it; AMBIGUITY_REF_REMOTE_REFUSED means a reference points outside the document you sent, so inline the target first; AMBIGUITY_REF_CYCLE_DETECTED means the references form a loop, so break it before asking again; AMBIGUITY_REF_DEPTH_EXCEEDED means a reference chain is longer than 32 hops, so flatten part of it; AMBIGUITY_WORK_REFUSED means the run was projected past the 2000000-unit budget before it started, and reports both numbers so you can see by how much, so narrow rules.enabled or send a smaller schema; and AMBIGUITY_OUTPUT_TOO_LARGE means the report itself would not fit the 2 MiB response ceiling, so raise minSeverity to trim it.
Context footprint
Findings carry pointers, rule codes and counts rather than schema text, so a report stays small next to the schema it describes; the list is capped at 1000 findings with truncated set when the cap is reached. A successful call costs 1 execution credit.
When to use it
When you want a reproducible, rule-by-rule read of a schema you are about to hand to an agent or publish to callers.
When you need to know whether a document is valid against the schema, or when you want the schema changed rather than reported on.
Scope
Non-goals
- We never claim a schema is ambiguous — a finding means the named rule fired
- We never quote a description, a property value or an enum member back to you
- We never fetch a reference: anything outside the document you sent is refused
- We never rewrite or repair the schema
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| schema | object | Yes | JSON Schema to inspect, 2 through 262144 bytes; extra keys are schema keywords and only same-document #/ references resolve. — unconstrained RFC 8259 JSON items. |
| rules | object | No | Closed published rule tuning; omit the object to run AMB-001 through AMB-009 with documented defaults. |
| minSeverity | string | No | Lowest severity to list; omit it for INFO. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| issues | array | Yes | Findings ordered by pointer then rule, 0 through 1000 closed objects. |
| severity | string | Yes | Highest severity across every finding before filtering, or NONE when the schema was clean. |
| ruleProfile | object | Yes | Closed profile receipt with profile, genericNameList, normalization, nameSimilarity and the threshold used or JSON null under EXACT_MATCH. |
| summary | object | Yes | Closed unfiltered counters with issueCount, byCode, bySeverity, rulesEvaluated, unsupportedForRule, nodeCount and truncated. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.detect_schema_ambiguity","input":{"schema":{"type":"object","properties":{"payload":{"type":"object"}}}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.detect_schema_ambiguity", {"schema":{"type":"object","description":"An order placed by a customer.","properties":{"payload":{"type":"object","description":"Whatever the caller sends."}}}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| AMBIGUITY_SCHEMA_INVALID | 400 | No | The request payload failed this skill's input validation. |
| AMBIGUITY_SCHEMA_TOO_LARGE | 429 | No | A size, quota, rate, or time limit was exceeded. |
| AMBIGUITY_RULE_UNKNOWN | 400 | No | The request payload failed this skill's input validation. |
| AMBIGUITY_RULE_PARAMETER_INVALID | 400 | No | The request payload failed this skill's input validation. |
| AMBIGUITY_SEVERITY_UNSUPPORTED | 400 | No | The skill does not support the requested variant. |
| AMBIGUITY_NODE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| AMBIGUITY_REF_REMOTE_REFUSED | 400 | No | The request payload failed this skill's input validation. |
| AMBIGUITY_REF_CYCLE_DETECTED | 400 | No | The request payload failed this skill's input validation. |
| AMBIGUITY_REF_DEPTH_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| AMBIGUITY_WORK_REFUSED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| AMBIGUITY_OUTPUT_TOO_LARGE | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- We never claim a schema is ambiguous — a finding means the named rule fired
- We never quote a description, a property value or an enum member back to you
- We never fetch a reference: anything outside the document you sent is refused
- We never rewrite or repair the schema
- Checking whether a document satisfies a schema
- Deciding whether an agent will actually pick the right field
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.detect_schema_ambiguity",
"input": {
"schema": {
"type": "object",
"description": "An order placed by a customer.",
"properties": {
"payload": {
"type": "object",
"description": "Whatever the caller sends."
}
}
}
}
}Examples
A generically named property with nothing constraining it
{
"schema": {
"type": "object",
"description": "An order placed by a customer.",
"properties": {
"payload": {
"type": "object",
"description": "Whatever the caller sends."
}
}
}
}{
"severity": "ERROR",
"ruleProfile": {
"profile": "ambiguity-rules-2",
"genericNameList": "generic-names-1",
"normalization": "norm-1",
"nameSimilarity": "jaro-winkler-1",
"nameSimilarityThreshold": 0.92
},
"summary": {
"issueCount": 2,
"byCode": {
"AMB-003": 1,
"AMB-004": 1
},
"bySeverity": {
"ERROR": 1,
"WARNING": 1
},
"rulesEvaluated": [
"AMB-001",
"AMB-002",
"AMB-003",
"AMB-004",
"AMB-005",
"AMB-006",
"AMB-007",
"AMB-008",
"AMB-009"
],
"unsupportedForRule": [],
"nodeCount": 2,
"truncated": false
},
"issues": [
{
"code": "AMB-003",
"severity": "WARNING",
"pointer": "/properties/payload",
"rule": "AMB-003",
"parameters": {
"genericNameList": "generic-names-1"
},
"message": "The member name is on the published generic-name list, which tells a reader nothing about what belongs here."
},
{
"code": "AMB-004",
"severity": "ERROR",
"pointer": "/properties/payload",
"rule": "AMB-004",
"parameters": {},
"message": "An object is declared with no properties and no restriction on what may be sent, so any shape satisfies it."
}
]
}Two sibling fields whose names read the same
{
"schema": {
"type": "object",
"description": "A shipment record for the warehouse.",
"properties": {
"shipmentId": {
"type": "string",
"description": "Identifier of the shipment."
},
"shipmentIds": {
"type": "string",
"description": "Identifier of the shipments."
}
}
}
}{
"severity": "WARNING",
"ruleProfile": {
"profile": "ambiguity-rules-2",
"genericNameList": "generic-names-1",
"normalization": "norm-1",
"nameSimilarity": "jaro-winkler-1",
"nameSimilarityThreshold": 0.92
},
"summary": {
"issueCount": 1,
"byCode": {
"AMB-009": 1
},
"bySeverity": {
"WARNING": 1
},
"rulesEvaluated": [
"AMB-001",
"AMB-002",
"AMB-003",
"AMB-004",
"AMB-005",
"AMB-006",
"AMB-007",
"AMB-008",
"AMB-009"
],
"unsupportedForRule": [],
"nodeCount": 3,
"truncated": false
},
"issues": [
{
"code": "AMB-009",
"severity": "WARNING",
"pointer": "/properties/shipmentIds",
"rule": "AMB-009",
"parameters": {
"comparison": "name",
"nameSimilarity": "JARO_WINKLER",
"nameSimilarityThreshold": 0.92,
"score": 0.9833,
"counterpartPointer": "/properties/shipmentId"
},
"message": "Two members of the same block have names a reader cannot tell apart under the declared similarity method and threshold."
}
]
}Recommended use cases
- Review a tool schema before you publish it to agents
- Gate a pull request on the error-severity rules while treating the rest as advice
- Compare two drafts of a contract by the number of findings each attracts
Avoid for
- Checking whether a document satisfies a schema
- Deciding whether an agent will actually pick the right field
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.