Skip to main content
Mintlify automatically generates llms.txt from your documentation. This guide focuses on writing TSDoc comments that produce helpful descriptions for your generated API reference.For general llms.txt information, see Mintlify’s llms.txt documentation.

Why llms.txt matters for mint-tsdocs

When you generate 400+ API reference pages, llms.txt acts as a table of contents for AI tools. It contains:
  • Page titles (your class/interface names)
  • Descriptions (from your TSDoc @remarks)
  • Organization (from your docs.json structure)
Good descriptions help AI tools:
  • Find relevant classes: “What caching options exist?” → Finds CacheManager with description
  • Understand purpose: Knows CacheManager handles caching, not cache instances
  • Navigate hierarchy: Understands relationships between classes

How mint-tsdocs generates descriptions

mint-tsdocs extracts frontmatter descriptions from your TSDoc comments:
Generates:
This description appears in:
  • llms.txt (for AI tool indexing)
  • Page frontmatter (for SEO and navigation)
  • API reference page (below the title)

Writing effective descriptions

Classes

Focus on what it does and key features:
✅ Good: Explains role, lists main responsibilities, mentions output format
❌ Too vague: Doesn’t explain what “manages” means or what it produces

Interfaces

Describe what data it represents and where it’s used:
✅ Good: Explains purpose, lists variable categories, mentions usage context
❌ Too generic: Doesn’t explain what template data this represents

Functions

Explain what it does and key parameters/behavior:
✅ Good: Clear action, mentions auto-detection, explains what it creates

Enums/Types

Describe possible values and use case:
✅ Good: Explains purpose, groups error categories, provides examples

Best practices

Length

Aim for 10-25 words in the first line (what becomes the description):

Specificity

Use concrete terms over vague ones: ✅ “Converts API models to template data for Liquid rendering” ❌ “Handles template data conversion” ✅ “LRU cache for type structure analysis with configurable size limits” ❌ “Cache implementation”

Keywords

Include TypeScript/API terminology that users might search for:

Consistency

Use similar patterns for similar items:
All cache classes follow the pattern: “[Type] cache for [purpose] with [features]“

Checking your descriptions

After generating docs, review your llms.txt:
1

Generate and deploy

2

Access llms.txt

Visit https://your-docs-url/llms.txt to see the generated file.
3

Review API reference section

Check that descriptions are:
  • ✅ Descriptive (not just repeating the class name)
  • ✅ Scannable (10-25 words)
  • ✅ Accurate (match what the class actually does)

Impact on AI tools

Before optimization:
After optimization:
The AI can answer from llms.txt alone, without fetching all pages.

Updating descriptions

To improve a description:
  1. Edit TSDoc in source code:
  2. Regenerate documentation:
  3. Verify in llms.txt after deploying
Focus on your most commonly used classes first. Optimize CacheManager, MarkdownDocumenter, ITemplateData, etc. before less common utilities.

Learn more

Mintlify llms.txt Docs

Full llms.txt specification and features

TSDoc Reference

Supported TSDoc tags and syntax

MCP Integration

Real-time search alternative to llms.txt

Config Reference

Configure frontmatter generation