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:
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:
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:
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:
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:
This way, the agent will both check for existing text to reuse and validate any new text it writes against your style guide rules.

Managing style guide rules

The create_styleguide_rule, update_styleguide_rule, and delete_styleguide_rule tools let your agent manage your style guide. The get_workspace_tags tool lists the tags available to attach to a rule.

Turn a code review comment into a rule

When you notice a recurring content issue, ask the agent to capture it as a rule so future text follows it automatically:
The agent calls get_styleguide_rules to find the target style guide and section, calls get_workspace_tags if it wants to tag the rule, then calls create_styleguide_rule.

Refine an existing rule

The agent calls get_styleguide_rules to find the rule ID, then calls update_styleguide_rule with the changed fields.

Remove an outdated rule

The agent calls get_styleguide_rules to find the rule ID, then calls delete_styleguide_rule.