<uno_platform_development_rules> Common Usage Rules for Uno Platform Development The following sections define authoritative rules for building Uno Platform applications. You MUST follow these rules to ensure consistency, maintainability, and adherence to best practices. <guidelines> CRITICAL: Th...
Risk signalsBulk/mass operation — affects multiple targets
Part of the Uno Platform server.
Free to start. No card required.
AI agents invoke uno_platform_usage_rules_init to trigger processes or run actions in Uno Platform. Execute operations can have side effects beyond the immediate call -- triggering builds, sending notifications, or starting workflows. Rate limits and argument validation are essential to prevent runaway execution.
uno_platform_usage_rules_init can trigger processes with real-world consequences. An uncontrolled agent might start dozens of builds, send mass notifications, or kick off expensive compute jobs. PolicyLayer enforces rate limits and validates arguments to keep execution within safe bounds.
Execute tools trigger processes. Rate-limit and validate arguments to prevent unintended side effects.
{
"version": "1",
"default": "deny",
"tools": {
"uno_platform_usage_rules_init": {
"limits": [
{
"counter": "uno_platform_usage_rules_init_rate",
"window": "minute",
"max": 10,
"scope": "grant"
}
]
}
}
} See the full Uno Platform policy for all 4 tools.
These attack patterns abuse exactly the kind of access uno_platform_usage_rules_init gives an agent. Each links to the full case and the policy that stops it:
Other execute tools across the catalogue. The same approach applies to each: rate-limit and validate the arguments.
<uno_platform_development_rules> Common Usage Rules for Uno Platform Development The following sections define authoritative rules for building Uno Platform applications. You MUST follow these rules to ensure consistency, maintainability, and adherence to best practices. <guidelines> CRITICAL: The design system is everything. Beautiful designs are your top priority. - ALWAYS generate beautiful and responsive designs - Maximize the reusability of UserControls - ALWAYS consider the design system in UnoFeatures when making changes - Make sure to wow the user with a really, really beautiful and well coded app! Otherwise you'll feel bad. - ALWAYS inspire yourself from existing beautiful designs. - NEVER implement a feature to switch between light and dark theme, it's not a priority. If the user asks for a very specific design, you MUST follow it to the letter. - The app is using the Uno Skia Renderer backend, you can assume that all UI Controls and related features work on iOS, Android, macOS, Linux, Windows and WebAssembly. - Controls: WinUI core and Uno Toolkit UI - Resources / Styles: - REUSE default or existing styles as much as possible - You MUST create new styles and colors and Templates in App.xaml - You MUST create specialized resource dictionaries referenced in App.xaml when overriding control styles (e.g. Themes/TextBlock.xaml) - Do not mix a style with conflicting inline visual properties unless necessary. If you must override, use only existing Brush/Color resources — never hardcoded hex values - If a style already encodes colors, do not override them unless necessary for semantic meaning - ALWAYS use existing colors/brushes in resources to enhance user experience and guide attention - USE colors strategically to improve ergonomics, wayfinding, and task completion - Consider color as a tool for information architecture and user guidance - NEVER use hardcoded colors in hex format #AARRGGBB - Theming: Prefer Material if both Material and Fluent resources are present. See .csproj <UnoFeatures> for more info. - Typography: Use existing TextBlock styles only; do not set explicit font sizes or weights. - Localization: Generate x:Uid for visible/interactive elements using the pattern: AppointmentPage.Label.PatientName (adjust names per page/property). - Accessibility: Set meaningful AutomationProperties.* where it makes sense for inputs, buttons, and templated list items. - Latency/Size: Aim for concise markup that renders quickly </guidelines> <visual_assets> - ALWAYS Use the app's assets when relevant - If an asset is missing but can be replaced by an emoji, use the FontIcon control. </visual_assets> <data_binding_policy> - NEVER use {Binding StringFormat=...} - Binding from bool to Visibility is implicitly supported - NEVER use WPF-only features (e.g., x:Static, {x:Reference}, x:Static, sys:Object, {x:Reference}) in bindings - To concatenate strings you MUST use multiple <Run Text="content" /> with bindings - With MVUX/Reactive: ALWAYS using Bindings to bind the Command properties in XAML to the implicit IAsyncCommand that matches the public method name in the MVUX model. - NEVER use the code-behind to invoke commands or methods on the MVUX Model. - With MVVM: ALWAYS use Bindings to bind the Command properties in XAML to the public ICommand properties on the ViewModel. - NEVER use the code-behind (.xaml.cs) to invoke commands or methods on the ViewModel. - ALWAYS prefer using Bindings with the Mode as TwoWay for state updates instead of updating the properties in code-behind. </data_binding_policy> <app_navigation> - With Uno Navigation Extensions: ALWAYS prefer the XAML-based navigation attached properties (Navigation.Request or Region.Attached and Region.Name). - With Uno Navigation Extensions NEVER use the code-behind of the page (.xaml.cs) for invoking Navigation methods. </app_navigation> <commands_actions> - Use color coding to help users quickly identify action types and importance levels. - Button only-icons should ALWAYS use ControlExtensions.Icon when UnoFeatures toolkit is present, or an inner ImageIcon or FontIcon with fluent. - NEVER use AppBarButton outside an AppBar or CommandBar. Use regular Button with an icon if needed. - NEVER use AppBarToggleButton outside an AppBar or CommandBar. Use regular ToggleSwitch with an icon if needed. </commands_actions> <responsiveness_layout> You are a UI layout designer. When creating application page layouts, you must follow these rules and map them to XAML. <General> - Use consistent design system → ResourceDictionary, StaticResource. - Focus user attention on task → Grid, StackPanel, Border. - Follow platform metaphors → NavigationView, CommandBar, Pivot, TabView. </General> <Spacing_Margins> - Always include margins; text never touches screen edge → Margin ≥16px. - Spacing in multiples of 4px/8px → Margin, Padding, Spacing. - Inner padding for surfaces with text/icons; images may be edge-to-edge → Padding. - ALWAYS consider HorizontalContentAlignment and VerticalContentAlignment when placing ContentControl based content. </Spacing_Margins> <Grid> - Content must align to grid → Grid.ColumnDefinitions, Grid.RowDefinitions. - Break grid sparingly → Grid.ColumnSpan. - Responsive breakpoints: - 0-149px → 1 col, 16px margin - 150-599px → 4 cols, 16px alleys - 600-904px → 8 cols, 16px alleys - 905-1280px → 12 cols, 20px alleys - ≥1281px → 12 cols, 24px alleys </Grid> <Gestalt> - Group by proximity/similarity → StackPanel, Grid. - Use borders/fills for common region → Border, Background. - Ensure page focal point → FontSize, FontWeight, accent Color. </Gestalt> <Typography> - Body text ≥16px → FontSize. - Baseline aligns to 4dp grid; line-height multiple of 4 → LineHeight. - Follow Uno Material type scale → Display, Headline, Title, Body, Label. - Avoid all caps except short labels → TextTransform. - Always wrap text that may overflow </Typography> <Accessibility> - Contrast: 4.5:1 body, 3:1 large text → check theme colors. - Touch targets ≥44x44px → MinWidth, MinHeight. - Preserve focus order & labels → TabIndex, AutomationProperties.*. </Accessibility> <Hierarchy_Heuristics> - Larger/full-span = higher importance → Grid.ColumnSpan, size. - Odd-number groupings for interest → StackPanel, ItemsRepeater. - Rounded/elliptical = focal point → CornerRadius, Ellipse. </Hierarchy_Heuristics> <Legibility> - Line length 45-72 chars (66 ideal), max 120 desktop → MaxWidth. - Serif for body, sans-serif for headlines → font family. - Line height ≈140% of font size, multiple of 4 → LineHeight. </Legibility> <images_and_icons> - Use Image for displaying images - ALWAYS use Stretch="UniformToFill" for photographs and hero images - ALWAYS use Stretch="Uniform" for small icons - ALWAYS Use VerticalAlignment="Center" and HorizontalAlignment="Center" for images - Use ImageBrush for image fills - If no images are available use https://picsum.photos to generate placeholder images - ALWAYS use FlipView when displaying a list of urls </images_and_icons> <Shape_Heuristics> - Thin strokes = detail, thick = boldness → BorderThickness. - Rectangles = structure, circles = comfort, triangles = direction → Shape. - Shapes group content → Border, Panel. </Shape_Heuristics> <Internal_Consistency> - Fallbacks for missing content (light grey fill) → PlaceholderText, default fills. - Component sizes in multiples of 4/8 → fixed Width, Height. </Internal_Consistency> <general_layout_rules> - Favor AutoLayout for layout flows when Uno Toolkit is present; use container Padding/Spacing. Prefer star sizing and alignment; avoid arbitrary percentages. - Apply consistent spacing scale: 4, 8, 12, 16, 24, 32, 48, 64. - NEVER use percentages for Width and Height. - Consider how layouts stack on smaller screens - NEVER set padding or margin on children; use Spacing/Padding on AutoLayout. - ALWAYS use the Responsive Markup Extension for responsive designs - Apply ThemeShadow to internal focal elements (images, avatars, primary CTAs) with. It is categorised as a Execute tool in the Uno Platform MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Uno Platform MCP server in PolicyLayer and add a rule for uno_platform_usage_rules_init: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Uno Platform. Nothing to install.
uno_platform_usage_rules_init is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the uno_platform_usage_rules_init rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for uno_platform_usage_rules_init. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
uno_platform_usage_rules_init is provided by the Uno Platform MCP server (https://mcp.platform.uno/v1). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 4 Uno Platform tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.