# Copilot Usage

## Copilot Usage

Now, when you are using the Cursor chat window and add a spark job as context, press "/" and you will get 2 *dataflint-copilot* prompts "spark expert", "highlight" and "optimize":

<figure><img src="/files/ZDEYGAA28XXhXONf2Zmu" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
You might want to approve all MCP tool calls without approval in Cursor/VScode setting, or add the DataFlint MCP requests to the allowlist of MCP tools that does not require approval.
{% endhint %}

**Highlight** will **add code highlight to your current job** based on the last run. You can also trigger it by asking Cursor "add highlight for this job"

<figure><img src="/files/Ss2otyIYNTmxmVtoVgFX" alt=""><figcaption></figcaption></figure>

**Optimize** also **optimize the code based on DataFlint alerts.** you can also trigger it by asking Cursor "optimize this job".

<figure><img src="/files/pXuIoGaFAYaw5rEc4FRb" alt=""><figcaption></figcaption></figure>


---

# 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://dataflint.gitbook.io/dataflint-for-spark/dataflint-copilot/copilot-usage.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.
