# Lumina

This submenu contains actions to work with the Lumina server:

* [Pull all metadata](#pull-all-metadata)
* [Push all metadata](#push-all-metadata)
* [View all metadata](#view-all-metadata)
* [Pull current function metadata](#pull-current-function-metadata)
* [Push current function metadata](#push-current-function-metadata)

To learn more about Lumina, please read: <https://www.hex-rays.com/products/ida/lumina>

### Pull all metadata

This commands retrieves [metadata](#lumina-metadata) about the current database from Lumina.

IDA will calculate checksums for all non-trivial functions in the database and send it to Lumina. This information will be used to match and retrieve metadata, which will be automatically applied.

Please note that this may overwrite your changes, so taking a database snapshot and saving the database before invoking this command is a good idea.

By non-trivial functions we mean:

```
  - long enough functions (>=16 bytes)
  - non-library functions
  - non-imported functions (functions with real body)
```

See also [View all metadata](#view-all-metadata), which allows the user to interactively apply metadata.

### Push all metadata

This commands sends [metadata](#lumina-metadata) about the current database to Lumina.

IDA will calculate checksums for all non-trivial functions in the database, extract metadata about them, and send it to Lumina. The metadata includes function names and types, user comments, operand types, etc.

If Lumina already has metadata about the involved functions, it will be replaced only if the new metadata is better and more complete.

Only functions with non-trivial names are pushed by this command.

### View all metadata

This commands retrieves [metadata](#lumina-metadata) about the current database from Lumina.

IDA will calculate checksums for all non-trivial functions in the database and send it to Lumina. This information will be used to match and retrieve metadata. After that IDA will display list of matched functions.

The user can then select the desired metadata and apply it to the database. If the result is not satisfactory, it is possible to revert the changes.

Once the window is closed, it is not possible to revert the changes anymore.

At the bottom of the window there are convenience buttons to apply or revert all available metadata.

See also [Pull all metadata](#pull-all-metadata), which automatically applied all retrieved metadata.

### Pull current function metadata

This commands tries to retrieve [metadata](#lumina-metadata) about the current function from Lumina. If successful, the metadata will be automatically applied.

### Push current function metadata

This commands sends [metadata](#lumina-metadata) about the current function to Lumina.

## Lumina Metadata

Metadata currently consists of the following information:

```
  - function address, name, prototype
  - function frame layout
  - stack variables
  - user-defined sp change points
  - representation of instruction operands
  - function and instruction comments
```

We plan to add more information to metadata in the future.


---

# 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://docs.hex-rays.com/9.0/user-guide/user-interface/menu-bar/lumina.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.
