← Ninety

Sanity Context

Ninety reads its rules two ways. This page uses the second: the hosted, read-only MCP endpoint, which is how an agent would see the same content. Everything below was fetched from that endpoint when this page was rendered — it is not a description of the integration.

https://api.sanity.io/v1/context/organizations/ovihgdwkx/mcp/ninety

Tools this endpoint serves

A GROQ query answered through Context

This asks the endpoint about Croatia’s date-banded membership — the fact that makes the same trip cost fourteen days in 2023 and nothing in 2022.

*[_type == "territory" && code == "HR"][0]{name, code, "bands": accessBands[]{window{from, to}, counted, modes}}

Context returned 1 document(s).

Initial context, verbatim

What an agent is handed before it asks anything.

# ninety: Context & Schema

## Efficiency

Prefer well-constructed queries over multiple exploratory calls.

## Accuracy

Only state what the data explicitly says. Don't infer, extrapolate, or connect dots that aren't there. Every claim should be grounded in content you retrieved.

If your query results are incomplete:
- Answer with what you found
- Be explicit about what's missing rather than guessing

When uncertain, acknowledge it. Better to say "I'm not certain" than to confidently state something wrong.

## Tools

- **schema_explorer**: Inspect a type's fields in detail. Use when you need to understand field structure before writing a query.
- **groq_query**: Query the dataset with GROQ. Always use projections and slices to control response size.

## Schema

**Schema overview**: document types, their fields, relationships between types, and document counts.

Query this content using GROQ. The schema shows you:
- **References**: follow with `->` for single refs (`author->name`) or `[]->{field}` for arrays (`categories[]->{title}`)
- **Incoming reference counts**: find related content with `count(*[references(^._id)])`
- **Document counts**: understand data distribution before querying

<resource-schema>
- allowance (title: title, depth: 1, count: 1)
  - fields: title<string>, code<slug>, windowDays<number>, limitDays<number>, countingBasis<arrival_inclusive|any_touch|departure_inclusive>, consequences<array>, sources<array>
  - referenced by: itinerary×2, territory×36, visaRegime×3
- dispute (title: question, depth: 2, count: 1)
  - fields: question<string>, subjectKind<presence_kind|territory|allowance|nationality_class>, presenceRule<reference>, territory<reference>, itinerary<reference>, competingClaims<array>, status<open|review|adjudicated|withdrawn>, ruling<object>, precedent<reference>
  - references: presenceRule->presenceRule×1
- itinerary (title: title, depth: 2, count: 2)
  - fields: title<string>, slug<slug>, holder<object>, allowance<reference>, summary<text>, demo<boolean>
  - references: allowance->allowance×2, holder.nationalityClass->nationalityClass×2
  - referenced by: trip×17
- nationalityClass (title: label, depth: 1, count: 3)
  - fields: label<string>, code<slug>, passports<array>, summary<text>, sources<array>
  - referenced by: itinerary×2, visaRegime×3
- permitExemption (title: label, depth: 1, count: 5)
  - fields: label<string>, kind<residence_permit|long_stay_visa|free_movement|permanent_residence|pending_application>, exemptsFromAllowance<boolean>, scopeTerritories<array>, conditions<text>, sources<array>
- presenceRule (title: label, depth: 1, count: 6)
  - fields: label<string>, code<slug>, kind<cleared_entry|airport_transit|airport_transit_landside|overnight_arrival|same_day|permitted>, counted<boolean>, disputed<boolean>, rationale<text>, sources<array>
  - referenced by: dispute×1
- source (title: title, depth: 1, count: 5)
  - fields: title<string>, publisher<string>, url<url>, kind<legislation|guidance|calculator|faq|treaty>, retrievedAt<datetime>, notes<text>
- territory (title: name, depth: 1, count: 36)
  - fields: name<string>, code<string>, kind<state|carve_out|external>, carveOutOf<reference>, allowances<array>, accessBands<array>
  - references: allowances[]->allowance×36, carveOutOf->territory×5
  - referenced by: territory×5
- trip (title: label, depth: 1, count: 17)
  - fields: label<string>, itinerary<reference>, stays<array>, notes<text>
  - references: itinerary->itinerary×17
- visaRegime (title: notes, depth: 2, count: 3)
  - fields: nationalityClass<reference>, allowance<reference>, window<object>, visaRequired<boolean>, maxDaysPerEntry<number>, allowedPurposes<tourism|business|family|study|work|transit>, notes<text>, sources<array>
  - references: allowance->allowance×3, nationalityClass->nationalityClass×3
</resource-schema>