How do I use @ mentions to give Cursor context?

Updated October 2026 · How we answer

Short answerType @ in the chat box and pick a file, folder, or symbol to attach it to your request. This tells the AI exactly which code to read instead of guessing from the open tab.

Attaching files and folders

When you type @ in Cursor's chat, a menu appears with options such as files, folders, code symbols, and recent changes. Selecting one adds it to the message as context the model can read. The menu names can differ slightly between versions, so look for the closest match if a label has moved.

  • Use @ followed by a filename to attach one file
  • Attach a folder when a task spans several related files
  • Pick a function or class name to point at one block of code

Keeping context focused

More context is not always better. Attaching a whole folder can dilute the answer if only two files matter, and it can use up more of your usage allowance. Start with the one or two files that define the behavior you care about, then add more only if the answer misses something.

Checking what the AI used

After a response, look at which files it references. If it cites a file you did not intend, remove the mention and ask again. Being specific with the attachments you pick usually gives you better edits than a long paragraph of explanation.

Common mistakes

  • Attaching the entire project and expecting a precise answer about one bug.
  • Forgetting to attach the file that defines the behavior, so the AI guesses.
  • Assuming the menu options never change between Cursor versions.
From our shopsCASEONYX: Dark-luxe tough phone cases.