Skip to main content
Glama

axint.compile

Read-onlyIdempotent

Compile TypeScript defineIntent() calls into native Swift App Intent code. Returns generated Swift or diagnostics on validation failure.

Instructions

Compile TypeScript source (defineIntent() call) into native Swift App Intent code. Returns { swift, infoPlist?, entitlements? } as a string — no files written, no network requests. On validation failure, returns diagnostics (severity, AX error code, position, fix suggestion) instead of Swift. Use: use when TypeScript DSL source should become Swift; use validate for cheaper preflight only. Inputs: source is TypeScript DSL text; options add sandbox, format, plist, or entitlement proof without writing files. Effects: read-only generated Swift/diagnostics; writes no files and uses no network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoWhen true (default), pipes generated Swift through swift-format with Axint's.
sourceYesFull TypeScript source code containing a defineIntent() call. Must be a complete file starting with an axint import, not a fragment.
fileNameNoOptional file name used in diagnostic messages, e.g., 'SendMessage.intent.ts'.
emitInfoPlistNoWhen true, returns an Info.plist XML fragment declaring the intent's.
emitEntitlementsNoWhen true, returns an .entitlements XML fragment for the intent's declared.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
isErrorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / emitEntitlements / description
      Previous value: -"When true, return..."New value: +"When true, returns an .entitlements XML fragment for the intent's declared."
    • changedInput schema / properties / emitInfoPlist / description
      Previous value: -"When true, return..."New value: +"When true, returns an Info.plist XML fragment declaring the intent's."
    • changedInput schema / properties / fileName / description
      Previous value: -"Optional file nam..."New value: +"Optional file name used in diagnostic messages, e.g., 'SendMessage.intent.ts'."
    • 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 / source / description
      Previous value: -"Full TypeScript source code containing a defineIntent()..."New value: +"Full TypeScript source code containing a defineIntent() call. Must be a complete file starting with an axint import, not a fragment."
  2. Changed7 schema fields changedv0.4.34
    • changedInput schema / properties / emitEntitlements / description
      Previous value: -"When true, returns an .entitlements XML fragment for the intent's declared entitlements. Only relevant for..."New value: +"When true, return..."
    • changedInput schema / properties / emitInfoPlist / description
      Previous value: -"When true, returns an Info.plist XML fragment declaring the intent's infoPlistKeys. Only relevant for..."New value: +"When true, return..."
    • changedInput schema / properties / fileName / description
      Previous value: -"Optional file name used in diagnostic messages, e.g., 'SendMessage.intent.ts'. Defaults to 'input.ts' if..."New value: +"Optional file nam..."
    • 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 / source / description
      Previous value: -"Full TypeScript source code containing a defineIntent() call. Must be a complete file starting with an axint..."New value: +"Full TypeScript source code containing a defineIntent()..."
    • 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. Changed5 schema fields changedv0.4.28
    • changedInput schema / properties / emitEntitlements / description
      Previous value: -"When true, returns an .entitlements XML..."New value: +"When true, returns an .entitlements XML fragment for the intent's declared entitlements. Only relevant for..."
    • changedInput schema / properties / emitInfoPlist / description
      Previous value: -"When true, returns an Info.plist XML..."New value: +"When true, returns an Info.plist XML fragment declaring the intent's infoPlistKeys. Only relevant for..."
    • changedInput schema / properties / fileName / description
      Previous value: -"Optional file name used in diagnostic..."New value: +"Optional file name used in diagnostic messages, e.g., 'SendMessage.intent.ts'. Defaults to 'input.ts' if..."
    • 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 / source / description
      Previous value: -"Full TypeScript source code containing a..."New value: +"Full TypeScript source code containing a defineIntent() call. Must be a complete file starting with an axint..."
  4. Addedv0.4.26

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description goes further by stating 'no files written, no network requests' and 'writes no files and uses no network.' It also discloses failure behavior (returns diagnostics instead of Swift), adding valuable context beyond annotations.

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 reasonably concise with clear sections (Returns, Use, Inputs, Effects) and front-loads the core purpose. There is some redundancy between the return statement and the later 'Effects' line, but overall it is well-organized and scannable.

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

Completeness4/5

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

For a five-parameter compile tool, the description covers purpose, output structure, error behavior, side effects, and usage alternative. It does not attempt to restate return values in detail (output schema exists), but it omits any mention of prerequisites or permissions, though those may not be relevant given the no-network, no-write nature.

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?

Input schema covers all five parameters with descriptions, so baseline is 3. The description adds little parameter-specific meaning: it groups options as 'sandbox, format, plist, or entitlement proof' but does not clarify individual parameters like fileName or the exact semantics of each boolean. No contradiction, but also no substantial added value.

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 opens with a specific verb and resource: 'Compile TypeScript source (defineIntent() call) into native Swift App Intent code.' It clearly distinguishes this from siblings by naming 'validate' as a cheaper preflight alternative and by specifying the exact return object.

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?

Explicit guidance is provided: 'Use: use when TypeScript DSL source should become Swift; use validate for cheaper preflight only.' This clearly states when to use this tool and directly names an alternative, satisfying the dimension fully.

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