create_vibe
Generates a designated energy or atmosphere by specifying name, energy type, frequency, and rhythm parameters.
Instructions
Create a vibe - an energy or atmosphere
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the vibe | |
| energy | Yes | Energy type | |
| frequency | No | Frequency/tempo (1-100 Hz) | |
| rhythm | No | Rhythmic pattern |
Implementation Reference
- index.js:488-544 (handler)The createVibe method is the handler that executes the 'create_vibe' tool logic. It validates inputs (name, energy), generates a vibe object with default frequency=50 and rhythm='ambient', stores it in the vibes Map, creates a rhythm generator, and returns a formatted response with energy visualization.
createVibe(args) { const { name, energy, frequency = 50, rhythm = 'ambient' } = args; if (!name || name.trim().length === 0) { return { content: [ { type: 'text', text: `❌ Vibe name is required. Please provide a name for the vibe.`, }, ], }; } if (!energy || energy.trim().length === 0) { return { content: [ { type: 'text', text: `❌ Energy type is required. Please specify an energy: calm, intense, chaotic, focused, or expansive.`, }, ], }; } if (this.vibes.has(name)) { return { content: [ { type: 'text', text: `⚠️ Vibe "${name}" already exists. Use a different name or pulse the existing vibe.`, }, ], }; } const vibe = { name, energy, frequency, rhythm, created_at: new Date().toISOString(), pulses: [], }; this.vibes.set(name, vibe); this.rhythms.set(`vibe_${name}`, this.generateRhythm(rhythm)); return { content: [ { type: 'text', text: `✨ Vibe "${name}" created!\n\nEnergy: ${energy}\nFrequency: ${frequency} Hz\nRhythm: ${rhythm}\n\n${this.visualizeVibeEnergy(energy, frequency)}\n\nThe ${energy} vibe resonates at ${frequency}Hz with ${rhythm} rhythm.`, }, ], }; } - index.js:96-124 (schema)The inputSchema for the 'create_vibe' tool defines the parameters: name (string, required), energy (string, enum: calm/intense/chaotic/focused/expansive, required), frequency (number 1-100, optional), and rhythm (string, enum: ambient/driving/syncopated/polyrhythmic/freeform, optional).
{ name: 'create_vibe', description: 'Create a vibe - an energy or atmosphere', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the vibe', }, energy: { type: 'string', enum: ['calm', 'intense', 'chaotic', 'focused', 'expansive'], description: 'Energy type', }, frequency: { type: 'number', minimum: 1, maximum: 100, description: 'Frequency/tempo (1-100 Hz)', }, rhythm: { type: 'string', enum: ['ambient', 'driving', 'syncopated', 'polyrhythmic', 'freeform'], description: 'Rhythmic pattern', }, }, required: ['name', 'energy'], }, - index.js:96-98 (registration)The tool named 'create_vibe' is registered in the ListToolsRequestSchema handler as part of the tools array with its name, description, and inputSchema.
{ name: 'create_vibe', description: 'Create a vibe - an energy or atmosphere', - index.js:335-336 (registration)The CallToolRequestSchema handler routes the 'create_vibe' string to this.createVibe(args) when the tool is called.
case 'create_vibe': return this.createVibe(args); - index.js:931-941 (helper)The visualizeVibeEnergy helper method generates a visual representation of the vibe's energy type and frequency, using symbols like ≈≈≈≈≈ for calm, ⚡⚡⚡⚡⚡ for intense, etc., and adding frequency wave symbols.
visualizeVibeEnergy(energy, frequency) { const energySymbols = { calm: '≈≈≈≈≈', intense: '⚡⚡⚡⚡⚡', chaotic: '✱✱✱✱✱', focused: '◉◉◉◉◉', expansive: '◎◎◎◎◎', }; const freq = '〜'.repeat(Math.ceil(frequency / 20)); return `${energySymbols[energy] || '≈≈≈≈≈'} ${freq}`; }