Attributes give you precise control over how your schema translates to prompts. Add context with @description, rename fields with @alias, or hide sensitive fields with @skip.
Notice how @skip completely removes the SSN field from the prompt—the model never sees it exists.
class Person {
name string @description("Full legal name")
email string? @description("Primary email address")
dob string @alias("date_of_birth") @description("Format: YYYY-MM-DD")
ssn string @alias("social_security") @skip
}
enum Priority {
Urgent @alias("P0") @description("Immediate attention required")
High @alias("P1")
Normal @alias("P2")
Low @alias("P3") @description("Can wait until next sprint")
}
function ExtractPerson(text: string) -> Person {
client "openai/gpt-4o-mini"
prompt #"
Extract person information from:
{{ text }}
{{ ctx.output_format }}
"#
}