# What the agent already knows

URL: https://kywi-docs-production.up.railway.app/agent/what-the-agent-already-knows
Type: docPage

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.

## The guide covers pasted kywi: references

The guide tells the agent what to do when you paste a reference copied with the editor's **Copy reference**: call `resolve_ref` first, then act on what it reports. The tool returns the guide from the installed `@kywi-software/mcp`, but a project's `AGENTS.md` keeps the copy it was generated with, so one generated before 0.31.0 lacks this section until you [regenerate it](/agent/retrofit-an-existing-project-for-agents/). See [Hand a module to your agent](/agent/hand-a-module-to-your-agent/).

## get_building_patterns — arguments

## 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](/agent/the-developer-servers-mode-decides-your-tool-list/).

## add_module — arguments, with a built-in module

## A tool description names a tool that isn’t there

The `list_components` tool's own description — the text an agent reads while deciding what to call — points at `kywi_patterns` for the component recipe. No tool by that name is registered on either server; the real name is `get_building_patterns`. If an agent reports that it couldn't find `kywi_patterns`, this is where it got the name.

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