feat: auto-links screen, keyphrase feed and MCP tools

- SEO › Auto-links (golem15.seo.autolinks, after Pages): list by phrase
  with locale, origin and active filters, the disabled row state, the
  form with its refusals, history through a field-less extension
- toolbar Add focus keyphrases (from_keyphrases) and
  POST /autolinks/from-keyphrases
- GET/POST /autolinks, PUT /autolinks/{id}, DELETE /autolinks and the
  tools seo_list_autolinks, seo_create_autolink, seo_update_autolink,
  seo_delete_autolinks, seo_autolinks_from_keyphrases
- the settings tile description and the permission comment name
  auto-links and the site audit
This commit is contained in:
Jakub Zych
2026-11-04 16:30:56 +01:00
parent 6203aec2bc
commit ab4e83416d
19 changed files with 852 additions and 13 deletions

53
mcp.go
View File

@@ -208,6 +208,59 @@ func (p *Plugin) MCP() pact.MCP {
Destructive: &destructive,
},
// Auto-links (D-82): phrases texts link to a page.
{
Name: "list_autolinks",
Title: "List auto-links",
Description: "Lists the auto-link phrases by phrase: each links its first occurrence in a text to its address, in one locale or all (locale \"\"), unless inactive. Filters: search text, locale (all for every locale), origin (manual, keyphrase, mcp) and active.",
Guard: mcpGuard,
Method: http.MethodGet,
Path: "/_seo/api/v1/autolinks",
Input: apicontrollers.ListAutolinksInput{},
Permissions: []string{mcpPermission},
},
{
Name: "create_autolink",
Title: "Create an auto-link",
Description: "Adds a phrase that texts link at its first occurrence (whole words, any letter case, never in headings, existing links or on the page it links to), at most autolink_max per text (seo_update_settings). The phrase needs 3 characters and may exist once per locale; the address is a path or a full http(s) address.",
Guard: mcpGuard,
Method: http.MethodPost,
Path: "/_seo/api/v1/autolinks",
Input: apicontrollers.CreateAutolinkInput{},
Permissions: []string{mcpPermission},
},
{
Name: "update_autolink",
Title: "Update an auto-link",
Description: "Changes the fields sent of one auto-link (phrase, address, locale, active, note), checked like a create.",
Guard: mcpGuard,
Method: http.MethodPut,
Path: "/_seo/api/v1/autolinks/{id}",
Input: apicontrollers.UpdateAutolinkInput{},
Permissions: []string{mcpPermission},
},
{
Name: "delete_autolinks",
Title: "Delete auto-links",
Description: "Deletes auto-links by id; texts stop linking their phrases when their pages are next rendered.",
Guard: mcpGuard,
Method: http.MethodDelete,
Path: "/_seo/api/v1/autolinks",
Input: apicontrollers.DeleteAutolinksInput{},
Permissions: []string{mcpPermission},
Destructive: &destructive,
},
{
Name: "autolinks_from_keyphrases",
Title: "Add auto-links from focus keyphrases",
Description: "Adds one auto-link per record whose focus keyphrase in a locale is not yet a phrase in that locale, linking to the record's address (origin keyphrase), and answers the count added. Running it again adds only new keyphrases.",
Guard: mcpGuard,
Method: http.MethodPost,
Path: "/_seo/api/v1/autolinks/from-keyphrases",
Input: apicontrollers.AutolinksFromKeyphrasesInput{},
Permissions: []string{mcpPermission},
},
// 404 log (D-20).
{
Name: "list_not_found",