The contextual menu provides quick access to AI-optimized content and direct integrations with popular AI tools. When users select the contextual menu on any page, they can copy content as context for AI tools or open conversations in ChatGPT, Claude, Perplexity, or a custom tool of your choice with your documentation already loaded as context.

  • Copy page: Copies the current page as Markdown for pasting as context into AI tools.
  • View as Markdown: Opens the current page as Markdown.
  • Open in ChatGPT: Creates a ChatGPT conversation with the current page as context.
  • Open in Claude: Creates a Claude conversation with the current page as context.
  • Open in Perplexity: Creates a Perplexity conversation with the current page as context.
  • Your custom options: Add your own options to the menu.
The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items.

Enabling the contextual menu

Add the contextual field to your docs.json file and specify which options you want to include.

{
 "contextual": {
   "options": [
     "copy",
     "view",
     "chatgpt",
     "claude",
     "perplexity"
   ]
 }
}

Adding custom options

Create custom options in the contextual menu by adding an object to the options array. Each custom option requires these properties:

title
string
required

The title of the option.

description
string
required

The description of the option. Displayed beneath the title when the contextual menu is expanded.

icon
string
required

The icon of the option. Accepts any icon from the Icons collection.

href
string | object
required

The href of the option. Use a string for simple links or an object for dynamic links with query parameters.

Example custom option:

"contextual": {
  "options": [
    "copy",
    "view",
    "chatgpt",
    "claude",
    "perplexity",
    {
      "title": "Ask Gemini",
      "description": "Ask Google Gemini about the current page",
      "icon": "sparkle",
      "href": {
        "base": "https://gemini.google.com/app",
        "query": [
          {
            "key": "q",
            "value": "Ask question about https://mintlify.com/docs$path.md"
          }
        ]
      }
    }
  ]
}