MCP tools reference
When an AI tool connects to UI Rules over MCP, it gets a set of tools. Most read your brand. A few write to it, and each of those needs a scope on the connection key that is never granted by default. This page lists all of them, so you can tell what an agent is doing when it reports a call, and so you can grant exactly the access you mean to.
The tools are named the way the agent sees them. You do not call them yourself.
The order the server asks agents to follow
The MCP server carries its own instructions, and a connected agent follows them without you scripting anything. The order is:
get_project_notes, to pick up what earlier sessions on this project decided.list_rule_areas, which returns the map of everything the brand has rules about, with counts but no rule text.get_design_tokens, for the stylesheet and canonical values.- Then, per element it builds,
get_rulesfor that area by name, orsearch_ruleswhen it has a concept but no area name. check_rule_complianceat the end, which hands back the verification procedure and a checklist rather than the rules themselves.report_usageandsave_project_notesto close the session out.
The custom instruction the v0 and Lovable guides ask you to paste is this order in a sentence, because those tools do not read the server's instructions on their own.
Reading tools
These need only a read scope. A Delivery only key carries all of them.
| Tool | What it does |
|---|---|
list_rule_areas | The index of every area the brand has rules about: each area's exact name, its rule count, and how many are Required. No rule text. The agent reads it as a table of contents. |
get_rules | One area's rules in full, named exactly as the index printed it. A top-level name such as Components serves the whole section, capped. If the project is delivering a pinned version, that is what comes back; live: true reads the live ruleset instead. |
search_rules | Rules for a concept the agent cannot name an area for: a focus ring, dark mode, the tone of an error message. Ranked, capped, and honest when nothing matches. |
get_rule | One rule by its id or key, when the agent already has it. |
get_design_tokens | The project's design tokens: the compiled :root and .dark CSS and the Tailwind @theme block, ready to paste, then the canonical values for reference. |
check_rule_compliance | The brand's verification procedure and the checklist of areas that have rules, for the agent to work through before it says the work is done. |
export_ruleset | The whole effective ruleset as one Markdown document, for dropping into a repo or reading end to end. |
list_brand_assets | The brand's fonts, icons, images, and documents, each with a permanent public URL. Belongs to the brand, so every project shares them. |
Session tools
These let an agent keep its own working state on a project. They write to UI Rules' own storage, never to your rules or tokens. The Agent sessions scope group grants them.
| Tool | What it does | Scope |
|---|---|---|
get_project_notes | The notes saved by earlier sessions on this project: checklist, conventions, files, memory. | notes:read |
save_project_notes | Saves one note per kind, replacing the last. | notes:write |
report_usage | A self-check after compliance: what was applied, what was skipped, and why. | usage:write |
send_feedback | A free-text message to whoever runs the design system, for a rule that was ambiguous or a token that was missing. Changes nothing else. | feedback:write |
Without these scopes the session tools fail closed and everything else keeps working.
Writing tools
These change your design system. Each needs its own scope from the Authoring group, and none is granted by default. Every one of them tells the agent to confirm with the user before it writes, because the change takes effect immediately and there is no undo from the tool side (though Version history still has you covered).
| Tool | What it does | Scope |
|---|---|---|
add_project_rule | Adds a rule to this project, attached to the node the agent names. It cannot change the brand's own ruleset, and no other project sees it. | rule:write |
override_rule | Changes an inherited brand rule for this project: a different Guidance, Importance, or body. The brand keeps its own rule. | rule:write |
set_design_token | Sets one token's value for this project, as an override. The brand keeps its own value. | token:write |
import_design_tokens | Takes a block of CSS the user pasted and previews what would change; writes nothing until apply=true. Defaults to project overrides. | token:write for the project, token:import for the brand |
import_design_tokens_from_site | Reads a website's tokens into the project or brand. Previews first, reads only the URL the user gave, and writes nothing until apply=true. | token:import |
Writing to the brand rather than a project is deliberately the bigger grant. token:import is what lets an import rewrite the canon every project inherits, and it is separate from token:write for that reason.
Granting scopes
The Connect your AI tools dialog offers presets when it creates a key: Full access, Read only, Delivery only, and None. Delivery only is enough for serving. Add the Agent sessions group when you want the agent to remember work between sessions, and Authoring only when you want a tool to be able to change things.
A tool a key is not allowed to use is simply not offered to the agent, so a read-only key never sees the writing tools at all.
Limits
Two limits apply to every connected tool:
- A per-minute rate limit on the endpoint. Past it, calls get a
429with a retry-after and the message "Rate limit exceeded. Slow down and retry shortly." - The plan's MCP calls per month. Past it, calls get "Plan limit reached" and stop until the meter resets. A call denied over the limit still counts. See Usage for where you stand.
Renamed tools
If a saved instruction names a tool that is not on this page, it is probably an earlier name. The old names are not served: an agent that calls one gets an error saying what the tool is called now, and is told to let you know so you can update the instruction. That matters most for the text pasted into v0's Custom Instructions or Lovable's Workspace knowledge, which nothing on the server can update for you.
| Old name | Current name |
|---|---|
get_notes | get_project_notes |
get_ruleset | list_rule_areas |
get_tokens | get_design_tokens |
validate | check_rule_compliance |
add_rule | add_project_rule |
set_token | set_design_token |
import_tokens | import_design_tokens |
scan_site | import_design_tokens_from_site |
list_assets | list_brand_assets |
save_note | save_project_notes |
export_markdown | export_ruleset |
