# Rosey UML Studio — AI Agent Reference (llms.txt) > AI-Native Modern Rational Rose & Academic UML Studio (https://rosey-seven.vercel.app) ## Capabilities - Proprietary text DSL: RoseyUML (.ruml) supporting 7 diagram types: Use Case, Activity (Swimlane), Sequence, Class, Statechart (`state`), ERD (`erd`), and SSM Rich Picture (`richpicture`). - Universal Import (Free): Auto-converts Mermaid (.mmd: flowchart, sequenceDiagram, classDiagram, native stateDiagram -> `state`, native erDiagram -> `erd`), PlantUML (.puml), IBM Rational Rose (.mdl), and Draw.io (.drawio/.xml) into RoseyUML (.ruml). - Native Export: .ruml (Free), IBM Rational Rose Petal v44 .mdl, 300 DPI PNG / Copy HD, Vector SVG (.svg), and Print-Ready PDF (Pro / Early Access / Research Pass). - Hybrid Layout: User-dragged positions are preserved in manual_layout while new AI elements receive auto-layout defaults. - Check Model Validator & One-Click Auto-Fix: Automated UML consistency checks + instant auto-fix (`UC_ORPHAN`, `ACT_NO_END`, `CLS_EMPTY`, `SEQ_CLASS_METHOD_MISMATCH`, `STATE_NO_FINAL`, `ERD_NO_PK`). - Realtime Collaboration: On-Demand Go Live Mabar + Share Links (View Only / Can Edit, auto-revoked after 5m idle). ## MCP Connection (rosey-mcp v2.1.0) Package: `rosey-mcp@2.1.0` (published on npmjs.com, zero dependencies, defaults to `https://rosey-seven.vercel.app`). 1 Scoped API Key (`rsk_live_...`) = 1 Project (all UML views). Early Access / Free accounts allow up to 3 Projects and 3 Active API Keys per user. ```json { "mcpServers": { "rosey": { "command": "npx", "args": ["-y", "rosey-mcp@latest", "--key", "rsk_live_YOUR_SCOPED_KEY"] } } } ``` ### MCP Tools & Resources - Resource `rosey://docs/ruml-syntax`: Complete RoseyUML grammar & Check Model self-healing guide. - `rosey_ruml_guide`: Fetch grammar, 4 diagram templates, and 5 style presets before authoring. - `rosey_get_model`: Read current `.ruml`, diagram index, version, key scope, and live `validationIssues`. - `rosey_apply_ruml({ ruml, mode?: "replace" | "append", summary })`: Apply `.ruml` (supports safe `append` for adding 1 view without overwriting existing views; auto-strips Markdown fences; returns `validationIssues` for self-healing). - `rosey_import_diagram({ source, format?: "auto" | "mermaid" | "plantuml" | "mdl" | "drawio", mode?: "append" | "replace", summary })`: Auto-convert external diagrams into `.ruml`. - `rosey_auto_fix({ summary? })`: Run One-Click Auto-Fix on the connected project to resolve `UC_ORPHAN`, `ACT_NO_END`, `CLS_EMPTY`, `SEQ_CLASS_METHOD_MISMATCH`, `STATE_NO_FINAL`, and `ERD_NO_PK`. ## REST API (Agent Scoped Key) - GET https://rosey-seven.vercel.app/api/v1/agent/apply (Header: `Authorization: Bearer rsk_live_...`) Returns `{ roseyVersion, projectId, projectName, ruml, style, version, scope, diagrams, validationIssues }`. - POST https://rosey-seven.vercel.app/api/v1/agent/apply (Header: `Authorization: Bearer rsk_live_...`) Body: `{ "ruml": "", "mode": "replace | append", "format": "auto | ruml | mermaid | plantuml | mdl | drawio", "summary": "Short description of change" }` Returns `{ mode, applyMode, convertedFrom, projectId, version|proposalId, diagrams, diagramTitles, validationIssues }`. Rate Limit: 60 req/min per key, max payload 512 KB. ## RoseyUML (.ruml) Minimal Grammar ```ruml model "Project Name" { style: "rational-rose" // rational-rose | pressman | rosa-shalahuddin | sommerville | modern-clean diagram usecase "System Use Case" { boundary "System Name" { uc UC01 "Primary Action" uc UC02 "Validation" } actor User User -> UC01 UC01 -include-> UC02 } diagram activity "Main Workflow" { lane User { start -> A1("Submit Form") } lane System { A1 -> D1?("Valid?") D1 -[Yes]-> A2("Save Record") -> end D1 -[No]-> A3("Show Error") -> end } } diagram sequence "Execution Flow" { actor User boundary WebUI control Service User -> WebUI: submit() WebUI -> Service: process() Service --> WebUI: result } diagram class "Domain Model" { package domain { class Service { +id: String +process(): Boolean } } } } ```