# Example Prompts for System Designer MCP Server
This document contains the natural language prompts that were used to generate each example in this directory. These prompts demonstrate how users can interact with an LLM to create MSON models using the System Designer MCP Server.
## Overview
All examples in this directory were generated by:
1. Providing a natural language prompt to an LLM
2. The LLM using the `create_mson_model` tool to create the model
3. Using `validate_mson_model` to ensure correctness
4. Using `generate_uml_diagram` to create PlantUML and Mermaid diagrams
5. Using `export_to_system_designer` to create System Designer export format
6. Using `create_system_runtime_bundle` to create System Runtime bundles
## Example 1: Student Management System (Simple)
### User Prompt
```
Create a simple student management system with the following requirements:
- Student entity with id, name, and email attributes
- Course entity with id, title, and credits attributes
- Students can enroll in multiple courses (many-to-many relationship)
- Courses can have multiple students enrolled
- Include an enroll() method on Student that takes a Course parameter
- Include an addStudent() method on Course that takes a Student parameter
- Use appropriate visibility modifiers (private for IDs, public for other attributes)
```
### Expected LLM Response
The LLM should use the `create_mson_model` tool with structured data representing:
- 2 entities (Student, Course)
- 1 relationship (Student enrolls in Course with 1:0..\* multiplicity)
- Appropriate attributes and methods as specified
### Generated Files
- `student-system.json` - MSON model
- `student-system-plantuml.puml` - PlantUML diagram
- `student-system-mermaid.md` - Mermaid diagram
- `student-system-export.json` - System Designer export
- `student-system-runtime-bundle.json` - System Runtime bundle
---
## Example 2: Banking System (Complex)
### User Prompt
```
Create a comprehensive banking system with the following requirements:
Core Entities:
- Customer: Personal information (firstName, lastName, email, phone, dateOfBirth, creditScore)
- Account: Account details (accountNumber, accountType, balance, interestRate, dateOpened, isActive, minimumBalance)
- Transaction: Transaction tracking (transactionId, transactionType, amount, timestamp, description, status)
- Loan: Loan management (loanId, loanType, principalAmount, interestRate, termMonths, monthlyPayment, outstandingBalance)
- Branch: Bank locations (branchId, branchName, address, phoneNumber, manager, operatingHours)
- Employee: Bank staff (employeeId, firstName, lastName, position, department, salary, hireDate)
- Address: Address information (street, city, state, zipCode, country)
- LoanApplication: Loan request workflow (applicationId, loanType, requestedAmount, applicationDate, status, creditScore, income)
Relationships:
- Customer owns multiple Accounts (1:0..*)
- Account has multiple Transactions (1:0..*)
- Customer has multiple Loans (1:0..*)
- Customer submits multiple LoanApplications (1:0..*)
- Branch serves multiple Customers (1:0..*)
- Branch employs multiple Employees (1:0..*)
- Employee works at one Branch (1:1)
- Customer lives at one Address (1:1)
- Branch located at one Address (1:1)
- LoanApplication approved by Employee (1:0..1)
- LoanApplication results in Loan (1:0..1)
Methods:
- Customer: openAccount(), closeAccount(), applyForLoan(), getAccountBalance(), transferFunds()
- Account: deposit(), withdraw(), getBalance(), getTransactionHistory(), calculateInterest(), closeAccount()
- Transaction: processTransaction(), validateTransaction(), getTransactionDetails()
- Loan: calculateMonthlyPayment(), makePayment(), getRemainingBalance(), refinanceLoan()
- Branch: openBranch(), closeBranch(), addCustomer(), getBranchDetails()
- Employee: processTransaction(), approveLoan(), openCustomerAccount(), getEmployeeDetails()
- Address: validateAddress(), getFullAddress(), updateAddress()
- LoanApplication: submitApplication(), updateStatus(), getApprovalStatus(), calculateLoanTerms()
Use appropriate visibility modifiers and data types for all attributes and methods.
```
### Expected LLM Response
The LLM should use the `create_mson_model` tool with structured data representing:
- 8 entities with detailed attributes and methods
- 11 relationships with proper multiplicities
- Comprehensive business logic for a banking system
### Generated Files
- `banking-system.json` - MSON model
- `banking-system-plantuml.puml` - PlantUML diagram
- `banking-system-mermaid.md` - Mermaid diagram
- `banking-system-export.json` - System Designer export
- `banking-system-runtime-bundle.json` - System Runtime bundle
---
## Example 3: E-Commerce System (Medium Complexity)
### User Prompt
```
Create an e-commerce system with the following requirements:
Entities:
- Customer: User account information (customerId, username, email, password, firstName, lastName, registrationDate)
- Product: Product catalog (productId, name, description, price, stockQuantity, category, imageUrl)
- Order: Customer orders (orderId, orderDate, status, totalAmount, shippingAddress, paymentMethod)
- OrderItem: Individual items in an order (orderItemId, quantity, unitPrice, subtotal)
- ShoppingCart: Customer's cart (cartId, createdDate, lastModified)
- CartItem: Items in shopping cart (cartItemId, quantity, addedDate)
- Payment: Payment processing (paymentId, amount, paymentDate, paymentMethod, status, transactionId)
- Category: Product categories (categoryId, name, description, parentCategory)
- Review: Product reviews (reviewId, rating, comment, reviewDate)
- Address: Shipping/billing addresses (addressId, street, city, state, zipCode, country, isDefault)
Relationships:
- Customer has one ShoppingCart (1:1)
- ShoppingCart contains multiple CartItems (1:0..*)
- CartItem references one Product (1:1)
- Customer places multiple Orders (1:0..*)
- Order contains multiple OrderItems (1:0..*)
- OrderItem references one Product (1:1)
- Order has one Payment (1:0..1)
- Product belongs to one Category (1:1)
- Category has multiple Products (1:0..*)
- Customer writes multiple Reviews (1:0..*)
- Review is for one Product (1:1)
- Product has multiple Reviews (1:0..*)
- Customer has multiple Addresses (1:0..*)
- Order ships to one Address (1:1)
Methods:
- Customer: register(), login(), addToCart(), checkout(), placeOrder(), writeReview(), addAddress()
- Product: updateStock(), applyDiscount(), getAverageRating(), isInStock()
- Order: calculateTotal(), updateStatus(), cancelOrder(), getOrderDetails()
- ShoppingCart: addItem(), removeItem(), updateQuantity(), clear(), getTotal()
- Payment: processPayment(), refund(), verifyPayment()
- Category: addProduct(), removeProduct(), getProducts()
- Review: submitReview(), updateReview(), deleteReview()
Include appropriate visibility modifiers and realistic data types.
```
### Expected LLM Response
The LLM should use the `create_mson_model` tool with structured data representing:
- 10 entities with comprehensive e-commerce functionality
- 14 relationships modeling the complete shopping workflow
- Methods covering cart management, ordering, payment, and reviews
### Generated Files
- `ecommerce-system.json` - MSON model
- `ecommerce-system-plantuml.puml` - PlantUML diagram
- `ecommerce-system-mermaid.md` - Mermaid diagram
- `ecommerce-system-export.json` - System Designer export
- `ecommerce-system-runtime-bundle.json` - System Runtime bundle
---
## How to Use These Prompts
### With an LLM (Claude, GPT-4, etc.)
1. Copy one of the prompts above
2. Paste it into your conversation with the LLM
3. The LLM should automatically use the `create_mson_model` tool
4. Review the generated model and request modifications if needed
5. Use `generate_uml_diagram` to visualize the model
6. Use `export_to_system_designer` to export for the System Designer app
7. Use `create_system_runtime_bundle` to create a System Runtime bundle
### Modifying the Prompts
You can customize these prompts by:
- Adding or removing entities
- Changing relationship multiplicities
- Adding more specific method signatures
- Specifying different attribute types
- Requesting specific design patterns (inheritance, composition, etc.)
### Best Practices
1. **Be Specific**: Clearly specify entity names, attributes, and relationships
2. **Include Multiplicities**: Specify how many instances can be related (1:1, 1:_, _:\*)
3. **Define Methods**: List the key operations each entity should support
4. **Use Domain Language**: Use terminology from the problem domain
5. **Specify Visibility**: Indicate which attributes/methods should be public/private
6. **Consider Constraints**: Mention any business rules or constraints
---
## Validation
All examples generated from these prompts have been validated using the `validate_mson_model` tool to ensure:
- ✅ All entity IDs are unique
- ✅ All relationship references are valid
- ✅ No orphaned relationships
- ✅ Proper multiplicity definitions
- ✅ Valid entity types and attributes
- ✅ Consistent method signatures
---
## System Runtime Bundles
Each example also includes a System Runtime bundle that can be used directly with the System Runtime framework. These bundles include:
- **Schemas**: Type definitions for all entities
- **Models**: Default instances and configurations
- **Types**: Primitive and custom type definitions
- **Behaviors**: Method implementations and business logic
- **Components**: UI component definitions (if applicable)
The bundles are generated using the `create_system_runtime_bundle` tool and validated with `validate_system_runtime_bundle`.
---
## Additional Resources
- [System Designer MCP Server Documentation](../README.md)
- [MSON Model Specification](../docs/mson-spec.md)
- [System Runtime Documentation](https://designfirst.io/systemruntime/)
- [PlantUML Documentation](https://plantuml.com/)
- [Mermaid Documentation](https://mermaid.js.org/)
---
## Contributing
If you create additional examples, please:
1. Document the natural language prompt used
2. Generate all output formats (JSON, PlantUML, Mermaid, Export, Runtime Bundle)
3. Validate the model using `validate_mson_model`
4. Add the prompt to this document
5. Submit a pull request
---
**Last Updated**: 2025-09-30
**Generated By**: System Designer MCP Server v1.0.0