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

# builtin__reshape

> Builds a value in a new JSON shape from earlier step results.

## Behavior

* `shape` is a JSON object whose leaf strings are templates.
* A leaf that is exactly one template keeps the value's type; mixed text becomes a string.
* It only moves data. It can't compute values like sums or conditionals.

## When to use it

* Rename, pick or nest fields between steps.
* To reshape every item in a list, call it inside a `map` and reference `{{item}}`.

| Loaded | Kind | Effect |
| - | - | - |
| Always | `reshape` | Read-only |

## Input

**shape** `object | any[] | string` *required*

The output shape. Usually an object: keys are literal and each leaf string is a template over the step's data (earlier results as \{\{Ex.field}}, the current map element as \{\{item}}, plan inputs as \{\{input.x}}), e.g. \{"pr":"\{\{item.number}}","label":"issue-\{\{item.number}}"}. A single template string such as "\{\{item.sha}}" returns that one value, so a map over a list of objects can produce a plain list of keys.

```yaml Plan step theme={null}
- id: E1
  tool_name: builtin__reshape
  input:
    shape: "{{input.shape}}"
```

```bash Inspect theme={null}
graph tool show builtin__reshape
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.