Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Schema Ambiguity Report

schema.detect_schema_ambiguity

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

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

Note
We report what nine published rules find in one JSON Schema, each finding carrying its rule code, its location and the thresholds it ran under.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input256 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
schemaobjectYesJSON Schema to inspect, 2 through 262144 bytes; extra keys are schema keywords and only same-document #/ references resolve. — unconstrained RFC 8259 JSON items.
rulesobjectNoClosed published rule tuning; omit the object to run AMB-001 through AMB-009 with documented defaults.
minSeveritystringNoLowest severity to list; omit it for INFO.

Output schema

FieldTypeRequiredDescription
issuesarrayYesFindings ordered by pointer then rule, 0 through 1000 closed objects.
severitystringYesHighest severity across every finding before filtering, or NONE when the schema was clean.
ruleProfileobjectYesClosed profile receipt with profile, genericNameList, normalization, nameSimilarity and the threshold used or JSON null under EXACT_MATCH.
summaryobjectYesClosed unfiltered counters with issueCount, byCode, bySeverity, rulesEvaluated, unsupportedForRule, nodeCount and truncated.

API contract

POST /v1/execute
curl
curl -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"}}}}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
AMBIGUITY_SCHEMA_INVALID400NoThe request payload failed this skill's input validation.
AMBIGUITY_SCHEMA_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
AMBIGUITY_RULE_UNKNOWN400NoThe request payload failed this skill's input validation.
AMBIGUITY_RULE_PARAMETER_INVALID400NoThe request payload failed this skill's input validation.
AMBIGUITY_SEVERITY_UNSUPPORTED400NoThe skill does not support the requested variant.
AMBIGUITY_NODE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
AMBIGUITY_REF_REMOTE_REFUSED400NoThe request payload failed this skill's input validation.
AMBIGUITY_REF_CYCLE_DETECTED400NoThe request payload failed this skill's input validation.
AMBIGUITY_REF_DEPTH_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
AMBIGUITY_WORK_REFUSED429NoA size, quota, rate, or time limit was exceeded.
AMBIGUITY_OUTPUT_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "schema": {
    "type": "object",
    "description": "An order placed by a customer.",
    "properties": {
      "payload": {
        "type": "object",
        "description": "Whatever the caller sends."
      }
    }
  }
}
Expected outputjson
{
  "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

Inputjson
{
  "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."
      }
    }
  }
}
Expected outputjson
{
  "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."
    }
  ]
}
  • 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

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.

Tags

analysisjsonschemavalidation