Skip to main content
Glama

axint.schema.compile

Read-onlyIdempotent

Compile minimal JSON schema to Swift, bypassing TypeScript DSL. Supports intents, views, components, widgets, and full apps with low token usage.

Instructions

Compile a minimal JSON schema directly to Swift, bypassing the TypeScript DSL entirely. Supports intents, views, components, widgets, and full apps via the 'type' parameter. Uses ~20 input tokens vs hundreds for TypeScript — ideal for LLM agents optimizing token budgets. Use: use for token-light JSON-to-Swift generation; use compile for full TypeScript DSL control and scaffold for TS starters. Inputs: schema kind selects intent, view, widget, or app output; options add companion metadata. Effects: read-only Swift generation; writes no files and uses no network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoView/widget only.
nameYesPascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used as the Swift struct name.
typeYesWhat to compile.
entryNoWidget only. Timeline entry fields as { fieldName: typeString }.
propsNoView only. Prop definitions as { fieldName: typeString }.
stateNoView only.
titleNoHuman-readable title shown in Shortcuts/Spotlight. Intent only.
domainNoApple App Intent domain. Intent only.
formatNoWhen true (default), pipes generated Swift through swift-format with Axint's.
paramsNoIntent only. Parameter definitions as { fieldName: typeString }.
scenesNoApp only. Scene definitions for the @main App struct.
familiesNoWidget only.
platformNoOptional target Apple platform hint for view/widget generation.
descriptionNoDescription of what this intent/view/widget does.
displayNameNoWidget only. Human-readable name shown in the widget gallery.
componentKindNoComponent only. Optional known component shape.
tokenNamespaceNoOptional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'.
refreshIntervalNoWidget only. Timeline refresh interval in minutes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
isErrorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed31 schema fields changed
    • changedInput schema / properties / body / description
      Previous value: -"View/widget only...."New value: +"View/widget only."
    • changedInput schema / properties / componentKind / description
      Previous value: -"Component only. O..."New value: +"Component only. Optional known component shape."
    • changedInput schema / properties / description / description
      Previous value: -"Description of wh..."New value: +"Description of what this intent/view/widget does."
    • changedInput schema / properties / displayName / description
      Previous value: -"Widget only. Huma..."New value: +"Widget only. Human-readable name shown in the widget gallery."
    • changedInput schema / properties / domain / description
      Previous value: -"Apple App Intent..."New value: +"Apple App Intent domain. Intent only."
    • addedInput schema / properties / entry / additionalProperties / description
      Added value: +"Swift type for this entry field: string, int, double, float, boolean, date."
    • changedInput schema / properties / entry / description
      Previous value: -"Widget only. Time..."New value: +"Widget only. Timeline entry fields as { fieldName: typeString }."
    • changedInput schema / properties / families / description
      Previous value: -"Widget only. Supp..."New value: +"Widget only."
    • addedInput schema / properties / families / items / description
      Added value: +"Widget family: systemSmall, systemMedium, systemLarge, systemExtraLarge."
    • changedInput schema / properties / format / description
      Previous value: -"When true (defaul..."New value: +"When true (default), pipes generated Swift through swift-format with Axint's."
    • changedInput schema / properties / name / description
      Previous value: -"PascalCase name, e.g., 'CreateEvent' for intents,..."New value: +"PascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used as the Swift struct name."
    • addedInput schema / properties / params / additionalProperties / description
      Added value: +"Swift type for this parameter: string, int, double, float, boolean, date."
    • changedInput schema / properties / params / description
      Previous value: -"Intent only. Para..."New value: +"Intent only. Parameter definitions as { fieldName: typeString }."
    • changedInput schema / properties / platform / description
      Previous value: -"Optional target A..."New value: +"Optional target Apple platform hint for view/widget generation."
    • addedInput schema / properties / props / additionalProperties / description
      Added value: +"Swift type for this prop: string, int, double, float, boolean, date, duration."
    • changedInput schema / properties / props / description
      Previous value: -"View only. Prop d..."New value: +"View only. Prop definitions as { fieldName: typeString }."
    • changedInput schema / properties / refreshInterval / description
      Previous value: -"Widget only. Time..."New value: +"Widget only. Timeline refresh interval in minutes."
    • changedInput schema / properties / scenes / description
      Previous value: -"App only. Scene d..."New value: +"App only. Scene definitions for the @main App struct."
    • addedInput schema / properties / scenes / items / description
      Added value: +"Scene definition with kind, view, and optional title/platform."
    • addedInput schema / properties / scenes / items / properties / kind / description
      Added value: +"Scene type. windowGroup is most common for single-window apps."
    • addedInput schema / properties / scenes / items / properties / name / description
      Added value: +"Unique scene identifier for programmatic access."
    • addedInput schema / properties / scenes / items / properties / platform / description
      Added value: +"Platform guard — wraps scene in #if os(...). Omit for cross-platform."
    • addedInput schema / properties / scenes / items / properties / title / description
      Added value: +"Window title shown in the title bar."
    • addedInput schema / properties / scenes / items / properties / view / description
      Added value: +"Root SwiftUI view name, e.g., 'ContentView'. Must be defined elsewhere."
    • addedInput schema / properties / state / additionalProperties / description
      Added value: +"State variable config with type and optional default value."
    • addedInput schema / properties / state / additionalProperties / properties / default / description
      Added value: +"Optional default value for the @State property."
    • addedInput schema / properties / state / additionalProperties / properties / type / description
      Added value: +"Swift type: string, int, double, float, boolean, date, duration, or url."
    • changedInput schema / properties / state / description
      Previous value: -"View only. State..."New value: +"View only."
    • changedInput schema / properties / title / description
      Previous value: -"Human-readable ti..."New value: +"Human-readable title shown in Shortcuts/Spotlight. Intent only."
    • changedInput schema / properties / tokenNamespace / description
      Previous value: -"Optional Swift to..."New value: +"Optional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'."
    • changedInput schema / properties / type / description
      Previous value: -"What to compile. Determines which other parameters are..."New value: +"What to compile."
  2. Changed33 schema fields changedv0.4.34
    • changedInput schema / properties / body / description
      Previous value: -"View/widget only. Raw SwiftUI code for the body, e.g., 'VStack { Text(\"Hello\") }'. Wrapped in the struct..."New value: +"View/widget only...."
    • changedInput schema / properties / componentKind / description
      Previous value: -"Component only. Optional known component shape. Use cardArchetypes for a multi-component card kit, or omit..."New value: +"Component only. O..."
    • changedInput schema / properties / description / description
      Previous value: -"Description of what this intent/view/widget does. Shown to users in system UI for intents. Optional but..."New value: +"Description of wh..."
    • changedInput schema / properties / displayName / description
      Previous value: -"Widget only. Human-readable name shown in the widget gallery. E.g., 'Daily Steps'. Defaults to a spaced..."New value: +"Widget only. Huma..."
    • changedInput schema / properties / domain / description
      Previous value: -"Apple App Intent domain. Intent only. One of: messaging, productivity, health, social, finance, commerce,..."New value: +"Apple App Intent..."
    • removedInput schema / properties / entry / additionalProperties / description
      Removed value: -"Swift type for this entry field: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / entry / description
      Previous value: -"Widget only. Timeline entry fields as { fieldName: typeString }. E.g., { steps: 'int' }. Do not include..."New value: +"Widget only. Time..."
    • changedInput schema / properties / families / description
      Previous value: -"Widget only. Supported widget sizes: systemSmall, systemMedium, systemLarge, systemExtraLarge,..."New value: +"Widget only. Supp..."
    • removedInput schema / properties / families / items / description
      Removed value: -"Widget family: systemSmall, systemMedium, systemLarge, systemExtraLarge,..."
    • changedInput schema / properties / format / description
      Previous value: -"When true (default), pipes generated Swift through swift-format with Axint's house style. Falls back to raw..."New value: +"When true (defaul..."
    • changedInput schema / properties / name / description
      Previous value: -"PascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used..."New value: +"PascalCase name, e.g., 'CreateEvent' for intents,..."
    • removedInput schema / properties / params / additionalProperties / description
      Removed value: -"Swift type for this parameter: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / params / description
      Previous value: -"Intent only. Parameter definitions as { fieldName: typeString }. E.g., { recipient: 'string', amount:..."New value: +"Intent only. Para..."
    • changedInput schema / properties / platform / description
      Previous value: -"Optional target Apple platform hint for view/widget generation. Use macOS when the host project is a Mac..."New value: +"Optional target A..."
    • removedInput schema / properties / props / additionalProperties / description
      Removed value: -"Swift type for this prop: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / props / description
      Previous value: -"View only. Prop definitions as { fieldName: typeString }. E.g., { title: 'string', count: 'int' }. Same type..."New value: +"View only. Prop d..."
    • changedInput schema / properties / refreshInterval / description
      Previous value: -"Widget only. Timeline refresh interval in minutes. E.g., 30 for half-hourly updates. Defaults to 60."New value: +"Widget only. Time..."
    • changedInput schema / properties / scenes / description
      Previous value: -"App only. Scene definitions for the @main App struct. At least one scene with kind 'windowGroup' is..."New value: +"App only. Scene d..."
    • removedInput schema / properties / scenes / items / description
      Removed value: -"Scene definition with kind, view, and optional title/platform"
    • removedInput schema / properties / scenes / items / properties / kind / description
      Removed value: -"Scene type. windowGroup is most common for single-window apps."
    • removedInput schema / properties / scenes / items / properties / name / description
      Removed value: -"Unique scene identifier for programmatic access"
    • removedInput schema / properties / scenes / items / properties / platform / description
      Removed value: -"Platform guard — wraps scene in #if os(...). Omit for cross-platform."
    • removedInput schema / properties / scenes / items / properties / title / description
      Removed value: -"Window title shown in the title bar"
    • removedInput schema / properties / scenes / items / properties / view / description
      Removed value: -"Root SwiftUI view name, e.g., 'ContentView'. Must be defined elsewhere."
    • removedInput schema / properties / state / additionalProperties / description
      Removed value: -"State variable config with type and optional default value"
    • removedInput schema / properties / state / additionalProperties / properties / default / description
      Removed value: -"Optional default value for the @State property"
    • removedInput schema / properties / state / additionalProperties / properties / type / description
      Removed value: -"Swift type: string, int, double, float, boolean, date, duration, or url"
    • changedInput schema / properties / state / description
      Previous value: -"View only. State variable definitions as { fieldName: { type: 'string', default?: value } }. Generates..."New value: +"View only. State..."
    • changedInput schema / properties / title / description
      Previous value: -"Human-readable title shown in Shortcuts/Spotlight. Intent only. E.g., 'Create Event'. Defaults to a..."New value: +"Human-readable ti..."
    • changedInput schema / properties / tokenNamespace / description
      Previous value: -"Optional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'. Generated views/components..."New value: +"Optional Swift to..."
    • changedInput schema / properties / type / description
      Previous value: -"What to compile. Determines which other parameters are relevant: intent uses params/domain/title; view uses..."New value: +"What to compile. Determines which other parameters are..."
    • removedOutput schema / properties / isError / description
      Removed value: -"Whether Axint marked the tool response as an error."
    • removedOutput schema / properties / text / description
      Removed value: -"Primary Axint tool response text, matching the first text content block."
  3. Changed28 schema fields changedv0.4.28
    • changedInput schema / properties / body / description
      Previous value: -"View/widget only. Raw SwiftUI code for the..."New value: +"View/widget only. Raw SwiftUI code for the body, e.g., 'VStack { Text(\"Hello\") }'. Wrapped in the struct..."
    • changedInput schema / properties / componentKind / description
      Previous value: -"Component only. Optional known component..."New value: +"Component only. Optional known component shape. Use cardArchetypes for a multi-component card kit, or omit..."
    • changedInput schema / properties / description / description
      Previous value: -"Description of what this intent/view/widget..."New value: +"Description of what this intent/view/widget does. Shown to users in system UI for intents. Optional but..."
    • changedInput schema / properties / displayName / description
      Previous value: -"Widget only. Human-readable name shown in..."New value: +"Widget only. Human-readable name shown in the widget gallery. E.g., 'Daily Steps'. Defaults to a spaced..."
    • changedInput schema / properties / domain / description
      Previous value: -"Apple App Intent domain. Intent only. One..."New value: +"Apple App Intent domain. Intent only. One of: messaging, productivity, health, social, finance, commerce,..."
    • changedInput schema / properties / entry / additionalProperties / description
      Previous value: -"Swift type for this entry field: string,..."New value: +"Swift type for this entry field: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / entry / description
      Previous value: -"Widget only. Timeline entry fields as {..."New value: +"Widget only. Timeline entry fields as { fieldName: typeString }. E.g., { steps: 'int' }. Do not include..."
    • changedInput schema / properties / families / description
      Previous value: -"Widget only. Supported widget sizes:..."New value: +"Widget only. Supported widget sizes: systemSmall, systemMedium, systemLarge, systemExtraLarge,..."
    • changedInput schema / properties / families / items / description
      Previous value: -"Widget family: systemSmall, systemMedium,..."New value: +"Widget family: systemSmall, systemMedium, systemLarge, systemExtraLarge,..."
    • changedInput schema / properties / format / description
      Previous value: -"When true (default), pipes generated Swift..."New value: +"When true (default), pipes generated Swift through swift-format with Axint's house style. Falls back to raw..."
    • changedInput schema / properties / name / description
      Previous value: -"PascalCase name, e.g., 'CreateEvent' for..."New value: +"PascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used..."
    • changedInput schema / properties / params / additionalProperties / description
      Previous value: -"Swift type for this parameter: string, int,..."New value: +"Swift type for this parameter: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / params / description
      Previous value: -"Intent only. Parameter definitions as {..."New value: +"Intent only. Parameter definitions as { fieldName: typeString }. E.g., { recipient: 'string', amount:..."
    • changedInput schema / properties / platform / description
      Previous value: -"Optional target Apple platform hint for..."New value: +"Optional target Apple platform hint for view/widget generation. Use macOS when the host project is a Mac..."
    • changedInput schema / properties / props / additionalProperties / description
      Previous value: -"Swift type for this prop: string, int,..."New value: +"Swift type for this prop: string, int, double, float, boolean, date,..."
    • changedInput schema / properties / props / description
      Previous value: -"View only. Prop definitions as { fieldName:..."New value: +"View only. Prop definitions as { fieldName: typeString }. E.g., { title: 'string', count: 'int' }. Same type..."
    • changedInput schema / properties / refreshInterval / description
      Previous value: -"Widget only. Timeline refresh interval in..."New value: +"Widget only. Timeline refresh interval in minutes. E.g., 30 for half-hourly updates. Defaults to 60."
    • changedInput schema / properties / scenes / description
      Previous value: -"App only. Scene definitions for the @main..."New value: +"App only. Scene definitions for the @main App struct. At least one scene with kind 'windowGroup' is..."
    • changedInput schema / properties / scenes / items / description
      Previous value: -"Scene definition with kind, view, and..."New value: +"Scene definition with kind, view, and optional title/platform"
    • changedInput schema / properties / scenes / items / properties / kind / description
      Previous value: -"Scene type. windowGroup is most common for..."New value: +"Scene type. windowGroup is most common for single-window apps."
    • changedInput schema / properties / scenes / items / properties / platform / description
      Previous value: -"Platform guard — wraps scene in #if os(...)...."New value: +"Platform guard — wraps scene in #if os(...). Omit for cross-platform."
    • changedInput schema / properties / scenes / items / properties / view / description
      Previous value: -"Root SwiftUI view name, e.g., 'ContentView'...."New value: +"Root SwiftUI view name, e.g., 'ContentView'. Must be defined elsewhere."
    • changedInput schema / properties / state / additionalProperties / description
      Previous value: -"State variable config with type and optional..."New value: +"State variable config with type and optional default value"
    • changedInput schema / properties / state / additionalProperties / properties / type / description
      Previous value: -"Swift type: string, int, double, float,..."New value: +"Swift type: string, int, double, float, boolean, date, duration, or url"
    • changedInput schema / properties / state / description
      Previous value: -"View only. State variable definitions as {..."New value: +"View only. State variable definitions as { fieldName: { type: 'string', default?: value } }. Generates..."
    • changedInput schema / properties / title / description
      Previous value: -"Human-readable title shown in Shortcuts/Spotl..."New value: +"Human-readable title shown in Shortcuts/Spotlight. Intent only. E.g., 'Create Event'. Defaults to a..."
    • changedInput schema / properties / tokenNamespace / description
      Previous value: -"Optional Swift token enum generated by..."New value: +"Optional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'. Generated views/components..."
    • changedInput schema / properties / type / description
      Previous value: -"What to compile. Determines which other..."New value: +"What to compile. Determines which other parameters are relevant: intent uses params/domain/title; view uses..."
  4. Addedv0.4.26

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and non-destructive. The description adds valuable context: 'read-only Swift generation; writes no files and uses no network,' clarifying side effects beyond the annotation hints. It does not contradict annotations and provides extra behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: it opens with the core action, then covers supported types, token efficiency, usage alternatives, input summary, and effects. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (18 parameters, nested objects, output schema), the description is remarkably complete. It covers purpose, usage guidance, token benefits, side effects, and alternatives. The output schema handles return values, so the description doesn't need to.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds semantic meaning by explaining the 'type' parameter selects output kind and highlights the minimal JSON schema input, going slightly beyond the schema's per-field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool compiles a minimal JSON schema directly to Swift, bypassing the TypeScript DSL. It explicitly lists supported output types (intents, views, components, widgets, apps) and distinguishes itself from sibling tools like compile and scaffold.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'use for token-light JSON-to-Swift generation; use compile for full TypeScript DSL control and scaffold for TS starters.' It also notes the token budget advantage, giving clear when-to-use context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.