suggest_internal_links
Generates top-K internal link suggestions for pages in a folder, excludes existing and self-links, and returns anchor hints to guide link placement.
Instructions
Suggest top-K internal links to add to each page in a folder.
By default uses TF-IDF cosine similarity over <title>, headings,
meta description and body text (offline, free). Set mode to
"openai" (text-embedding-3-small), "gemini"
(gemini-embedding-001) or "local" (sentence-transformers) for
embedding similarity; model overrides the default model. Vectors
are cached in SQLite by content hash, so re-runs are cheap. Excludes links the source already has, plus
the page itself. Returns suggestions for page only if
provided, otherwise for every page.
Each suggestion includes a cheap anchor_hint derived from
terms shared between source headings and target title.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | tfidf | |
| page | No | ||
| limit | No | ||
| model | No | ||
| top_k | No | ||
| folder | Yes | ||
| pattern | No | *.html | |
| site_host | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||