> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superwire.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Type Annotations

> Where type annotations appear and how to write readable contracts.

Type annotations appear after a field name.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
input {
    project_id: number
    title: string
    urgent: boolean
}
```

## Field descriptions

Use triple-slash comments for schema field descriptions.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
schema task_summary {
    /// Short display title
    title: string

    /// One paragraph summary
    summary: string

    /// Routing priority
    priority: enum { low, medium, high }
}
```

## Agent outputs

Agent output contracts are required and object-shaped.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
agent summarize {
    model: model.fast
    instruction: "Summarize {{ input.title }}."

    output {
        summary: string
        action_items: [string]
    }
}
```

## Reusing schemas

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
schema summary_output {
    summary: string
    action_items: [string]
}

agent summarize {
    model: model.fast
    instruction: "Summarize {{ input.title }}."
    output: schema.summary_output
}
```

## Tool contracts

`input {}` and `output {}` on tools define schemas. They do not bind runtime values.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
tool fetch_task from mcp.tasks.tool.fetch_task {
    input {
        task_id: number
    }

    output {
        title: string
        description: string
        status: string
    }
}
```

Runtime values are supplied with `bindings {}` at the call site.
