# Modify Data

You can directly modify the results obtained using the Eagle Plugin API method. To save the modified results, just call the `save()` method of the result object. Here are some simple examples:

## **Example 1: Modify the selected file of the current application**

```javascript
// Get the currently selected file in the Eagle app
let items = await eagle.item.getSelected();
let item = items[0];

// Modify tags
item.tags = ['tag1', 'tag2'];

// Save changes
await item.save();

```

## **Example 2: Modify folder properties**

```javascript
// Get the currently selected folder in the Eagle app
let folder = (await eagle.folder.getSelected())[0];

// Modify properties
folder.name = 'New Folder Name';
folder.description = 'New description...';

// Save changes
await folder.save();
```

{% hint style="success" %}
**🦄 Best Practice:** To ensure data security, use the API-provided `save()` method for data access and modification, and avoid directly modifying any files under the Eagle resource library.
{% 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://developer.eagle.cool/plugin-api/tutorial/modify-eagle-data.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.
