# Liquid console

The **Liquid console** is a scratchpad for testing [Mechanic Liquid](/platform/liquid.md) code. It's available in the footer of every page of the Mechanic app — look for it at the bottom of the screen.

Type any Liquid code and the console runs it after you edit, showing the output after a short delay. This is useful for experimenting with filters, testing snippets from a task, or inspecting data available for a specific event. Use **Reset** to clear your scratchpad, **Documentation** to open the Liquid docs, or **Ask Mechanic** when you want help using the console.

{% hint style="info" %}
Most Mechanic users don't need the Liquid console day-to-day. It's mainly useful when writing or debugging task code, or when support asks you to inspect event data.
{% endhint %}

<figure><img src="/files/Ev23KlTbAitQBShdya72" alt="The Liquid console with a sample Liquid expression and its output"><figcaption></figcaption></figure>

{% hint style="info" %}
The console can make Shopify Admin API requests (up to 10 per submission), which [task previews](/core/tasks/previews.md) cannot. However, it has tighter memory limits than actual task runs. If you reach a limit, try testing your code in a task subscribing to mechanic/user/trigger instead.
{% endhint %}

## Inspecting event data

When viewing a specific event in the Mechanic app, the console has access to that event's data — the same variables your tasks had when they processed it. This makes it a useful debugging tool.

For example, on a shopify/orders/create event page, you could use `{% log order.line_items[0] %}` to inspect the contents of an order's first line item.

![Using the Liquid console to inspect an order's line items on an event page](/files/0DpzdrkIoft0HQXq7Rn8)

{% hint style="info" %}
Looking at a child event? Try using `{% log event.parent %}` in the console to inspect data available from the parent. Or, to examine data from an ancestor event further back, try `{% log event.parent.parent %}`.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://learn.mechanic.dev/app/liquid-console.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
