What You’ll Build
A voice-controlled note app where users can:- Say “Save a note saying pick up milk” → Note appears on dashboard
- Say “What’s my note?” → Mira reads it back
- Say “Clear my note” → Note is removed
Features Demonstrated
Mira Tool Calls
Voice commands that trigger functions
Simple Storage
Persist data across sessions
Dashboard API
Display persistent UI
Prerequisites
- Basic understanding of MentraOS apps (Quickstart)
- Developer Console account (console.mentra.glass)
- Local development setup with ngrok (Deployment Overview)
Step 1: Define Tools in Developer Console
First, create three tools in the Developer Console for your app:Tool 1: Save Note
Tool 2: Read Note
Tool 3: Clear Note
These tool definitions are configured in the Developer Console, not in your code. Mira uses these descriptions to decide when to call each tool.
Step 2: Create the App Server
Create a new filesrc/index.ts:
Step 3: Understanding the Code
Session Management
- User opens your app on glasses
- App loads saved note from Simple Storage
- If note exists, display it on dashboard immediately
- User sees their note when they look up
Tool Call Handling
- User says something like “Save a note saying pick up milk”
- Mira recognizes this matches the
save_notetool - Mira extracts parameters:
{ note: "pick up milk" } - Your
onToolCallis triggered with the tool ID and parameters - You handle the logic (save to storage, update dashboard)
- You return context for Mira to formulate a response
Tool Response: Context vs Control
By default (what we’re using):- “Got it, I’ve saved that note for you”
- “Your note has been added to the dashboard”
- “Done, I’ve saved that”
When to use each approach
When to use each approach
Let Mira respond (default - recommended):
- Natural, conversational responses
- User expects voice assistant behavior
- Simple confirmations
- Need specific formatting
- Want to show custom UI
- Need to display data that doesn’t translate well to speech
- Want precise control over wording
Step 4: Simple Storage API
Simple Storage provides localStorage-like API with cloud sync:- Per-user isolation - Each user has their own storage
- Cloud sync - Data persists across devices and sessions
- Local caching - Fast reads after initial fetch
- String values - Store strings (use JSON.stringify/parse for objects)
Step 5: Dashboard API
The dashboard displays persistent UI in the bottom-right when user looks up:- Keep text short (dashboard space is limited)
- Use for glanceable information
- Update when data changes
- Clear when no longer relevant
Step 6: Testing
Local Testing
-
Start your app:
-
Create ngrok tunnel:
-
Update Developer Console:
- Go to console.mentra.glass/apps
- Set your app’s URL to the ngrok URL
-
Test on glasses:
- Open your app on MentraOS glasses
- Say: “Save a note saying test message”
- Look up → You should see “test message” on dashboard
- Say: “What’s my note?”
- Say: “Clear my note”
What to Expect
When saving:- User: “Save a note saying pick up milk”
- Mira: “Got it, I’ve saved that note”
- Dashboard displays: “pick up milk”
- User: “What’s my note?”
- Mira: “Your note says: pick up milk”
- User: “Clear my note”
- Mira: “Your note has been cleared”
- Dashboard becomes empty
Common Issues
Tool Not Being Called
Problem: Mira doesn’t recognize your voice command Solution: Improve tool descriptionsNote Not Persisting
Problem: Note disappears when app restarts Solution: Make sure you’re loading the note inonSession:
Dashboard Not Updating
Problem: Dashboard shows old/wrong content Solution: Always update dashboard after storage changes:Extending This Example
Add Note Categories
Add Timestamps
Add Note History
Key Takeaways
Tool descriptions matter - They help Mira understand when to call your toolsSimple Storage persists data - Perfect for user preferences and quick data
Dashboard is glanceable - Great for persistent, at-a-glance information
Tool responses are context - Mira uses them to formulate natural responses
Load data in onSession - Always restore saved data when user opens app
Next Steps
AI Tool Calls
Learn more about tool calls (under maintenance, returning later in 2026)
Simple Storage
Complete storage API reference
Dashboard API
Dashboard display guide
Deployment
Deploy your app
Discord Community
Get help and share

