Skip to main content
Glama

axint.schema.compile

Read-onlyIdempotent

Compile minimal JSON schema directly to Swift source code with token usage stats. Supports intents, views, components, widgets, and apps using ~20 input tokens. No files written or network requests.

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. Returns Swift source with token usage stats; no files written, no network requests. On invalid input, returns an error message describing the issue. Use: use for token-light JSON-to-Swift generation; use compile for full TypeScript DSL control and scaffold for TS starters. 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
Behavior5/5

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

Annotations provide readOnlyHint, idempotentHint, destructiveHint. The description adds: 'Returns Swift source with token usage stats; no files written, no network requests. On invalid input, returns an error message.' This aligns with annotations and provides additional context about effects and error handling, with no contradictions.

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

Conciseness4/5

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

The description is front-loaded with the key purpose, then provides details on capabilities, token benefits, return value, error handling, and usage. It is slightly verbose but well-structured and informative.

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 18 parameters with 100% schema coverage and an output schema, the description covers all essential aspects: function, use cases, behavioral traits, error handling, and usage guidance. It is complete for an AI agent to select and invoke the tool correctly.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description does not add significant meaning beyond what the parameter descriptions already provide in the schema. It uses the 'type' parameter contextually but not in detail.

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 purpose: 'Compile a minimal JSON schema directly to Swift, bypassing the TypeScript DSL entirely.' It lists supported types (intents, views, components, widgets, apps) and distinguishes from sibling tools with explicit usage guidance.

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 when-to-use guidance: 'Use: 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 optimization, helping the agent decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agenticempire/axint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server