Skip to content

What the agent already knows

An agent can pull the building-patterns guide and the live module catalog straight from its own tools, so a prompt never needs to restate either.

Two no-argument tools exist on both MCP servers specifically so an agent isn't told the same thing twice: get_building_patterns, which returns Kywi's building-patterns guide, and list_module_types, which returns the live module catalog.

get_building_patterns

Calling it returns the whole guide as markdown, read once and cached for the life of the server process. It's the identical text whether you call it from the site server or the developer server — and identical, in turn, to what's already sitting in a scaffolded project's own AGENTS.md, because create-kywi-app pastes this exact file into every generated app's AGENTS.md verbatim. If a project's AGENTS.md is already in context, calling this tool tells you nothing it didn't already say.

get_building_patterns — argumentsjson
{}

list_module_types

Calling it returns every non-deprecated built-in module's name, label, category and props, computed from the same registry the renderer reads — it cannot fall out of sync with what actually renders. Call it before add_module — but not because the schema makes you: module there is a plain string with no enum behind it, so a misspelled name is accepted by the tool and lands in the layout rather than being rejected.

What this catalog covers is the built-ins. A custom module declared in kywi.config.ts is an equally valid module value and will never appear here; the developer server's get_modules is the tool that names those — in api mode. In filesystem mode it comes back empty, for the reason described in The developer server's mode decides your tool list.

add_module — arguments, with a built-in modulejson
{
  "type": "page",
  "id": "abc123",
  "region": "main",
  "rowId": "row-1",
  "colId": "col-1",
  "module": "richText",
  "props": { "content": "<p>Hello</p>" }
}

Why call the tool instead of assuming

Neither call needs a running project or a config file — both work the moment a server is connected, before anything else about the site or the config is known. That makes them the cheaper source of truth than restating either one in a prompt: the module catalog changes as Kywi ships new built-ins, and a prompt that hardcodes a module list goes stale the moment it does.