# `PhoenixKit.API.PublicDiscovery.Guide`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.64.1/lib/phoenix_kit/api/public_discovery/guide.ex#L1)

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).

# `build`

```elixir
@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).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
