trace_line
Trace a strategic line with adjustable speed and carry messages to maintain rhythmic flow in creative workflows.
Instructions
Trace along a line with a specific rhythm
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line_name | Yes | Name of the line to trace | |
| speed | No | Speed multiplier | |
| message | No | Message or data to carry along the line |
Implementation Reference
- index.js:575-608 (handler)The traceLine method handles the 'trace_line' tool logic. It looks up a line by name, checks if it exists, retrieves the rhythm, creates a trace object with timestamp/message/speed/rhythmStep, pushes it to the line's traces array, and returns a formatted response with animation.
traceLine(args) { const { line_name, speed = 1, message = '' } = args; const line = this.lines.get(line_name); if (!line) { return { content: [ { type: 'text', text: `❌ Line "${line_name}" not found.`, }, ], }; } const rhythm = this.rhythms.get(`line_${line_name}`); const trace = { timestamp: new Date().toISOString(), message, speed, rhythmStep: rhythm ? rhythm.next() : 1, }; line.traces.push(trace); return { content: [ { type: 'text', text: `〰️ Tracing line "${line_name}"\n\nFrom: ${line.from} → To: ${line.to}\nSpeed: ${speed}x\nMessage: "${message}"\n\n${this.animateLineTrace(line.rhythm, speed)}\n\nRhythm pulse: ${trace.rhythmStep}`, }, ], }; } - index.js:150-172 (schema)The input schema for 'trace_line' tool, defining properties: line_name (string, required), speed (number 0.1-10), and message (string).
{ name: 'trace_line', description: 'Trace along a line with a specific rhythm', inputSchema: { type: 'object', properties: { line_name: { type: 'string', description: 'Name of the line to trace', }, speed: { type: 'number', minimum: 0.1, maximum: 10, description: 'Speed multiplier', }, message: { type: 'string', description: 'Message or data to carry along the line', }, }, required: ['line_name'], }, - index.js:339-340 (registration)Registration of the 'trace_line' tool in the switch statement that dispatches tool calls to the traceLine handler method.
case 'trace_line': return this.traceLine(args); - index.js:954-960 (helper)Helper method animateLineTrace used by trace_line to generate a visual animation based on speed.
animateLineTrace(rhythm, speed) { const base = '→'; const fast = '⟫'; const slow = '⟶'; const symbol = speed > 1.5 ? fast : speed < 0.5 ? slow : base; return symbol.repeat(8); }