Skip to main content
The Ditto MCP server works best when you give your AI agent instructions about when and how to use its tools. You can include these instructions directly in a prompt, or add them to a project-level configuration file like CLAUDE.md (Claude Code), .cursorrules (Cursor), or similar. Below are example instructions organized by tool.

Style guide rules

The get_styleguide_rules tool lets your agent fetch your team’s content rules and apply them when writing UI text.

Generate UI with compliant text

Add this to your agent instructions to apply style guide rules whenever the agent creates new UI:
Use the style guides in Ditto to generate UI with compliant text.
The agent will call get_styleguide_rules before writing any user-facing strings, and apply those rules to the text it generates.

Audit existing strings

You can also use the tool to check and fix text that already exists in your codebase:
Check my existing user-facing strings and update them so they comply
with style guide rules in Ditto.
The agent will fetch your rules, scan your code for user-facing strings, and suggest updates where the text doesn’t match your guidelines.

Text search and reuse

The search_ditto_text tool lets your agent find and reuse strings that already exist in your Ditto projects.

Reuse text when generating UI

Add this instruction so your agent checks Ditto for existing text before writing new copy:
Try to reuse text in Ditto when generating UI.
When the agent needs to add a button label, heading, or other UI string, it will search Ditto first and reference existing text when a match is found.

Replace hardcoded strings

You can ask the agent to scan your codebase and swap hardcoded strings for existing Ditto text:
Look at my existing user-facing strings in my codebase and see if you
can replace any with text that exists in Ditto.
The agent will search Ditto for matches against your current strings and suggest replacements where equivalent text already exists.

Combining tools

For the best results, combine both tools in your agent instructions:
When working on UI:
- Use the style guides in Ditto to ensure all user-facing text follows
  our content guidelines.
- Try to reuse existing text from Ditto instead of writing new copy.
This way, the agent will both check for existing text to reuse and validate any new text it writes against your style guide rules.