Skip to main content
Glama
suhitanantula

LLV Helix Framework

create_loop

Generate a loop with a specified type and rhythm to define iterative cycles for strategic or creative workflows.

Instructions

Create a loop - an iterative cycle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the loop
typeYesType of loop pattern
rhythmNoRhythm pattern of iterations

Implementation Reference

  • The createLoop() method - the actual implementation of the 'create_loop' tool. It validates name/type inputs, checks for duplicate loops, creates a loop object with name/type/rhythm/iterations/phase, stores it in the loops Map, generates a rhythm pattern, and returns a formatted success response.
    createLoop(args) {
      const { name, type, rhythm = 'constant' } = args;
    
      if (!name || name.trim().length === 0) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Loop name is required. Please provide a name for the loop.`,
            },
          ],
        };
      }
    
      if (!type || type.trim().length === 0) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Loop type is required. Please specify a type: infinite, convergent, divergent, spiral, or oscillating.`,
            },
          ],
        };
      }
    
      if (this.loops.has(name)) {
        return {
          content: [
            {
              type: 'text',
              text: `⚠️ Loop "${name}" already exists. Use a different name or iterate the existing loop.`,
            },
          ],
        };
      }
    
      const loop = {
        name,
        type,
        rhythm,
        iterations: [],
        created_at: new Date().toISOString(),
        phase: 0,
      };
    
      this.loops.set(name, loop);
      this.rhythms.set(`loop_${name}`, this.generateRhythm(rhythm));
    
      return {
        content: [
          {
            type: 'text',
            text: `🔄 Loop "${name}" created!\n\nType: ${type}\nRhythm: ${rhythm}\n\n${this.visualizeLoopPattern(type)}\n\nThe ${type} loop is ready with ${rhythm} rhythm.`,
          },
        ],
      };
    }
  • The input schema for the 'create_loop' tool registered in the ListToolsRequestHandler. Defines the tool name, description, and input schema with required fields 'name' (string) and 'type' (enum: infinite, convergent, divergent, spiral, oscillating), plus optional 'rhythm' (enum: constant, variable, fibonacci, exponential, harmonic).
    {
      name: 'create_loop',
      description: 'Create a loop - an iterative cycle',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Name of the loop',
          },
          type: {
            type: 'string',
            enum: ['infinite', 'convergent', 'divergent', 'spiral', 'oscillating'],
            description: 'Type of loop pattern',
          },
          rhythm: {
            type: 'string',
            enum: ['constant', 'variable', 'fibonacci', 'exponential', 'harmonic'],
            description: 'Rhythm pattern of iterations',
          },
        },
        required: ['name', 'type'],
      },
    },
  • index.js:333-334 (registration)
    The routing/case statement in the CallToolRequestSchema handler that dispatches 'create_loop' calls to this.createLoop(args).
    case 'create_loop':
      return this.createLoop(args);
  • The loop object construction and storage: creates the loop state object (with name, type, rhythm, iterations array, created_at timestamp, and phase), stores it in this.loops Map, and registers a generated rhythm under 'loop_{name}' in this.rhythms Map. Also used by the createLoop handler.
    const loop = {
      name,
      type,
      rhythm,
      iterations: [],
      created_at: new Date().toISOString(),
      phase: 0,
    };
    
    this.loops.set(name, loop);
    this.rhythms.set(`loop_${name}`, this.generateRhythm(rhythm));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose side effects, persistence, or authorization needs. It only states the tool 'creates' but doesn't explain whether it modifies state, requires special permissions, or has side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no waste. It is front-loaded with the key information. Could be slightly expanded without harm, but current is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 3 parameters and no output schema or annotations, the description does not mention what is returned, whether it persists, or any prerequisites. Incomplete for an agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all three parameters. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Create' and resource 'loop', adding 'iterative cycle' for context. It differentiates from sibling 'iterate_loop' by implication (create vs. iterate), but doesn't explicitly distinguish from other create tools like 'create_line' or 'create_vibe'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'iterate_loop' or 'compose_rhythm'. No preconditions or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/suhitanantula/llv-helix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server