K

MCP tools reference

Every tool a connected AI agent gets from UI Rules over MCP: what each one is for, the order the server asks agents to use them in, and which connection-key scope each needs.
PreviousNext

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:

  1. get_project_notes, to pick up what earlier sessions on this project decided.
  2. list_rule_areas, which returns the map of everything the brand has rules about, with counts but no rule text.
  3. get_design_tokens, for the stylesheet and canonical values.
  4. Then, per element it builds, get_rules for that area by name, or search_rules when it has a concept but no area name.
  5. check_rule_compliance at the end, which hands back the verification procedure and a checklist rather than the rules themselves.
  6. report_usage and save_project_notes to 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.

ToolWhat it does
list_rule_areasThe 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_rulesOne 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_rulesRules 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_ruleOne rule by its id or key, when the agent already has it.
get_design_tokensThe 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_complianceThe 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_rulesetThe whole effective ruleset as one Markdown document, for dropping into a repo or reading end to end.
list_brand_assetsThe 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.

ToolWhat it doesScope
get_project_notesThe notes saved by earlier sessions on this project: checklist, conventions, files, memory.notes:read
save_project_notesSaves one note per kind, replacing the last.notes:write
report_usageA self-check after compliance: what was applied, what was skipped, and why.usage:write
send_feedbackA 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).

ToolWhat it doesScope
add_project_ruleAdds 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_ruleChanges an inherited brand rule for this project: a different Guidance, Importance, or body. The brand keeps its own rule.rule:write
set_design_tokenSets one token's value for this project, as an override. The brand keeps its own value.token:write
import_design_tokensTakes 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_siteReads 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 429 with 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 nameCurrent name
get_notesget_project_notes
get_rulesetlist_rule_areas
get_tokensget_design_tokens
validatecheck_rule_compliance
add_ruleadd_project_rule
set_tokenset_design_token
import_tokensimport_design_tokens
scan_siteimport_design_tokens_from_site
list_assetslist_brand_assets
save_notesave_project_notes
export_markdownexport_ruleset

Bring your brand to every AI tool

Set your rules once and use them in every AI tool you work in.