***

title: getStepOrder
slug: /reference/typescript/agents/context-builder/get-step-order
description: Return the ordered list of step names in a context.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[context]: /docs/server-sdks/reference/typescript/agents/context-builder/context

Return the ordered list of step names in this context. This is an internal
method on [`Context`][context].

## **Parameters**

None.

## **Returns**

`readonly string[]` -- The step names in order.

## **Example**

```typescript {8}
import { ContextBuilder } from '@signalwire/sdk';

const builder = new ContextBuilder();
const ctx = builder.addContext('default');
ctx.addStep('greet').setText('Greet the caller.');
ctx.addStep('ask_name').setText('Ask for their name.');

console.log(ctx.getStepOrder()); // ["greet", "ask_name"]
```