create_line
Define a path or connection between two points with customizable rhythm to shape strategic flows in creative workflows.
Instructions
Create a line - a connection or path between points
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the line | |
| from | Yes | Starting point | |
| to | Yes | Ending point | |
| rhythm | No | Rhythm of the line |
Implementation Reference
- index.js:361-428 (handler)The createLine method is the handler function that executes the 'create_line' tool logic. It validates required args (name, from, to), checks for duplicate names, creates a line object with a generated rhythm, stores it, and returns a success response.
createLine(args) { const { name, from, to, rhythm = 'steady' } = args; if (!name || name.trim().length === 0) { return { content: [ { type: 'text', text: `❌ Line name is required. Please provide a name for the line.`, }, ], }; } if (!from || from.trim().length === 0) { return { content: [ { type: 'text', text: `❌ Starting point (from) is required. Please specify where the line starts.`, }, ], }; } if (!to || to.trim().length === 0) { return { content: [ { type: 'text', text: `❌ Ending point (to) is required. Please specify where the line ends.`, }, ], }; } if (this.lines.has(name)) { return { content: [ { type: 'text', text: `⚠️ Line "${name}" already exists. Use a different name or trace the existing line.`, }, ], }; } const line = { name, from, to, rhythm, created_at: new Date().toISOString(), traces: [], }; this.lines.set(name, line); this.rhythms.set(`line_${name}`, this.generateRhythm(rhythm)); return { content: [ { type: 'text', text: `〰️ Line "${name}" created!\n\nFrom: ${from} → To: ${to}\nRhythm: ${rhythm}\n\n${this.visualizeLineRhythm(rhythm)}\n\nThe line is ready to carry messages with ${rhythm} rhythm.`, }, ], }; } - index.js:45-71 (schema)Input schema definition for the 'create_line' tool, specifying name (string, required), from (string, required), to (string, required), and rhythm (string enum with optional values: steady, accelerating, pulsing, syncopated, flowing).
{ name: 'create_line', description: 'Create a line - a connection or path between points', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the line', }, from: { type: 'string', description: 'Starting point', }, to: { type: 'string', description: 'Ending point', }, rhythm: { type: 'string', enum: ['steady', 'accelerating', 'pulsing', 'syncopated', 'flowing'], description: 'Rhythm of the line', }, }, required: ['name', 'from', 'to'], }, }, - index.js:331-332 (registration)The registration/dispatch point where the tool name 'create_line' is matched in the CallToolRequestSchema switch-case and routed to this.createLine(args).
case 'create_line': return this.createLine(args); - index.js:909-918 (helper)Helper function visualizeLineRhythm used by createLine to generate a visual ASCII representation of the line's rhythm pattern.
visualizeLineRhythm(rhythm) { const patterns = { steady: '━━━━━━━━', accelerating: '━━━━━━━━━⟫', pulsing: '━ ━ ━ ━', syncopated: '━━ ━ ━━━', flowing: '〰️〰️〰️〰️', }; return patterns[rhythm] || '━━━━━━━━'; } - index.js:46-46 (registration)The tool is declared with name 'create_line' in the ListToolsRequestSchema handler, making it discoverable to MCP clients.
name: 'create_line',