Skip to main content
The contextual menu adds AI tool options directly to your documentation pages. This guide focuses on recommended configurations for mint-tsdocs projects with large API references.For full contextual menu features and options, see Mintlify’s contextual menu documentation.

Why add a contextual menu?

When you generate 400+ API reference pages with mint-tsdocs, the contextual menu helps users:
  • Quick questions: Copy a class definition to ask their AI tool about usage
  • Deep exploration: Open ChatGPT/Claude with an entire API page as context
  • Editor setup: Install your MCP server in Cursor/VS Code with one click
  • Share context: Export pages as markdown for team discussions
Think of it as a “Share to AI” button on every page of your API reference. Add to your docs.json:
{
  "contextual": {
    "options": ["copy", "claude", "mcp", "cursor"]
  }
}
This gives users:
  • copy - Copy page as markdown (works with any AI tool)
  • claude - Open in Claude.ai with page context
  • mcp - Copy your MCP server URL for manual setup
  • cursor - One-click MCP installation in Cursor

Why these options for mint-tsdocs?

OptionBenefit for API Reference
copyUniversal - works with any AI tool, perfect for “explain this interface” questions
claude/chatgptPre-loads entire page context for deep exploration of complex types
mcpQuick copy for manual MCP setup across different tools
cursor/vscodeOne-click installation removes friction for editor-based workflows
Start with 3-4 options. Too many choices can overwhelm users. You can always add more based on usage.

Configuration examples

Minimal (open source projects)

{
  "contextual": {
    "options": ["copy", "mcp"]
  }
}
Good for: Projects where users may have various AI tool preferences.

Developer-focused

{
  "contextual": {
    "options": ["copy", "claude", "cursor", "vscode"]
  }
}
Good for: Projects targeting developers who use AI-enhanced editors.

Comprehensive

{
  "contextual": {
    "options": ["copy", "chatgpt", "claude", "perplexity", "mcp", "cursor", "vscode"]
  }
}
Good for: Maximizing discoverability, especially for complex APIs.

Use cases with generated API reference

Exploring complex interfaces

User visits ITemplateData reference page:
  1. Clicks contextual menu → “Open in Claude”
  2. Claude opens with full interface definition
  3. Asks: “Explain each property and when I’d use it”

Debugging type errors

User encounters error with MarkdownDocumenter:
  1. Opens the class reference page
  2. Clicks “Copy” from contextual menu
  3. Pastes into their AI tool with error message
  4. Gets context-aware troubleshooting

Template customization

User customizing Liquid templates:
  1. Opens ITemplateData reference
  2. Clicks “Install MCP in Cursor”
  3. Works in Cursor with AI that knows available template variables

Team knowledge sharing

Developer discussing implementation:
  1. Opens NavigationManager reference
  2. Clicks “Copy”
  3. Pastes in Slack/Discord: “Should we use this for our custom navigation?”

Verifying the menu

After adding to docs.json and deploying:
  1. Visit any API reference page (e.g., /reference/mint-tsdocs.cachemanager)
  2. Look for the AI menu icon (usually top-right)
  3. Click to see your configured options
  4. Test the “Copy” option - should copy page content as markdown
The menu appears on all pages, including your entire generated API reference.

Promoting the feature

Help users discover the contextual menu in your documentation:

In your README

## AI-Assisted Documentation

Each API reference page has an AI menu (⋮) with options to:
- Copy as markdown for your AI tool
- Open in Claude/ChatGPT with full context
- Install our MCP server for real-time search

Try it on any [API reference page](/reference/mint-tsdocs.cachemanager).

In your quickstart guide

<Tip>
New to our API? Click the AI menu on any reference page to ask questions
about that specific class or interface in your preferred AI tool.
</Tip>

Custom options (optional)

For organization-specific integrations, you can add custom menu items. See Mintlify’s contextual menu docs for details. Example for internal tools:
{
  "contextual": {
    "options": [
      "copy",
      "mcp",
      {
        "title": "Search Internal Examples",
        "description": "Find usage in our codebase",
        "icon": "github",
        "href": {
          "url": "https://github.com/yourorg/search",
          "params": { "q": "$path" }
        }
      }
    ]
  }
}

Learn more