# Ask the model

Ask the model one question, offering it the operations you choose, and get back text, the calls it chose, or a fixed shape that later steps can use.

Model step, Ask the model:

- Step kind: `ModelCall`
- Instructions: `Read the ticket. Say what it is about…`
- Model: `tier/medium`
- Output: `Structured`

## Inputs

- `Instructions` (string, required): The question the step asks, sent as a user message. Raw text, or a reference to a prompt Momor holds.
- `Model` (model selector): The models the step may run on: a model ID, tier/high, anthropic/*, or an object with Name, Tier, Publisher, Provider and System. Where absent, the workflow’s Model applies, and where the workflow names none, the step asks for auto: the models the organization lists in Settings › Models, tried in order.
- `Operations` (string[]): Declared operations the model may call during this step: tools, workflows and waits. It can only call what is listed.
- `Output` (output contract): The reply shapes the step accepts. Where absent, it accepts text, calls, or both. Values: `Content`, `ToolCall`, `Structured: <schema>`, `OneOf: [...]`.
- `Attempts` (integer, default `1`): How many logical requests the step may make when a reply fails, after Gateway has already tried every eligible provider.
- `Gather` (AsNeeded | Always, default `AsNeeded`): Always requires the reply to call at least one operation, so the output must admit calls.
- `Knowledge` (Open | ToolsOnly, default `Open`): ToolsOnly builds the answer from results already in the conversation, with claims tied to their sources.
- `OnExhausted` (policy): What happens when the attempts run out. Without one, the step fails.

## Outputs

- `Content` (string): The reply’s text. Output: Content keeps only this.
- `Calls` (object[]): The calls the reply chose. Output: ToolCall keeps only these; an ExecuteModelToolCall step runs them.
- `<schema fields>` (object): With Output: { Structured: … }, the step’s value is the validated object itself, so later steps read its fields: { Field: Triage.Topic }.

## Example

```yaml
- ModelCall: Triage
  Instructions: Read the ticket. Say what it is about and how urgent it is.
  Model: tier/medium
  Output:
    Structured:
      type: object
      required: [Topic, Urgency]
      properties:
        Topic: { type: string }
        Urgency: { type: string, enum: [Low, Normal, High] }
```

## When the model calls tools

Calls the model makes to declared tools come back in `Calls`; the step does not run them. Ask for `Output: ToolCall`, run the calls with `ExecuteModelToolCall`, and hand the results back with `DeliverResults`. Calls to a declared wait are the exception: the step raises the wait itself and asks the model again with the answer.

```yaml
- ModelCall: Plan
  Instructions: Decide which issues this ticket needs opened.
  Operations: [Tracker]
  Output: ToolCall
- ExecuteModelToolCall: Open
  Operations: [Tracker]
- DeliverResults: HandOver
```

`Tracker` is a declared operation binding the tools of an MCP tool server. `ExecuteModelToolCall` runs only calls its own `Operations` allow; a call outside them is returned to the model as a failure, not run.

> **Model calls go through Gateway**
> Provider failover, attachments and costs work as described in the [Gateway docs](/docs/gateway/). Attachments on the request are prepared for the model automatically. Momor makes these calls for the organization, so a Workflow organization needs no Gateway API key. Changing the model doesn’t change the workflow.

## Related steps

- [If](/docs/workflows/steps/if/): Branch on what the model returned.
- [Wait for approval](/docs/workflows/steps/wait-for-approval/): Stop until a person decides.
- [Call a tool](/docs/workflows/steps/call-a-tool/): Call one tool directly, without a model.
