> For the complete documentation index, see [llms.txt](https://cyr1en.gitbook.io/commandprompter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cyr1en.gitbook.io/commandprompter/prompts/anvil-ui-prompt.md).

# Anvil UI Prompt

Use `a:` to capture text through the native Anvil rename interface.

```
/nick <a:Choose a new nickname>
```

For inline prompts, the display text becomes the Anvil title when titles are enabled and no custom title is configured. If it contains `{br}`, only the text before the first marker is used as that fallback title; later segments are not rendered as lore.

The player types into the rename field and clicks the output/result slot to submit. Closing the UI, clicking an enabled cancel item, or submitting the configured cancel keyword cancels the session. Sanitization strips color codes by default, but `-ds` or preset `"sanitize": false` preserves them.

## Preset support

Anvil preset definitions in `presets.json` are fully wired in 3.2.0:

* `title`: Sets the Anvil window title.
* `prompt_text` / `left_button.button_text`: Sets the initial text in the rename field.
* `left_button.*`: Configures the input item (`show`, `button_text`, `button_icon`, `button_hover_text`, `custom_model_data`).
* `right_button.*`: Configures the cancel item (`show`, `button_text`, `button_icon`, `button_hover_text`, `custom_model_data`).

Anvil prompts use version-specific providers for Minecraft 26.1.2 and 26.2.x. If a compatible provider cannot open, CommandPrompter falls back to a Chat prompt.

| Capability         | Behavior                                                                              |
| ------------------ | ------------------------------------------------------------------------------------- |
| Prompt key         | `a:`                                                                                  |
| Display formatting | MiniMessage and legacy codes                                                          |
| Configuration      | [Anvil UI settings](/commandprompter/configuration/prompts-configuration/anvil-ui.md) |

![](https://i.imgur.com/aDNfv3j.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cyr1en.gitbook.io/commandprompter/prompts/anvil-ui-prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
