PhoenixKit.API.PublicDiscovery.Guide (phoenix_kit v2.64.1)

Copy Markdown View Source

The content of the public guide (GET /mcp) as data: a title, links and a list of sections, each a list of blocks. The two renderers (PhoenixKit.API.PublicDiscovery.GuideHTML, PhoenixKit.API.PublicDiscovery.GuideMarkdown) only lay it out, so the words are chosen, and translated, here.

The headings and the fixed sentences go through gettext, in the page's language. What a module declared stays as declared (English): tool titles and descriptions. So do the command lines and the JSON of the snippets.

A block is one of:

  • {:p, text};
  • {:list, [text]};
  • {:facts, [{label, value}]} - a label and a value shown as code;
  • {:code, label, language, text} - a labelled code block;
  • {:links, [{label, url}]};
  • {:tool, map} - one tool: :title, :description, :rest_label, :rest_name, :mcp_label, :mcp_name and :note (nil or a sentence).

Summary

Functions

The guide for the origin it names, written in language (a locale the gettext backend has), for the public tools of the site called project (its project title).

Functions

build(origin, language, tools, project)

@spec build(String.t(), String.t(), [PhoenixKit.API.Tool.t()], String.t() | nil) ::
  map()

The guide for the origin it names, written in language (a locale the gettext backend has), for the public tools of the site called project (its project title).