Skip to main content
Glama

Set the loop

set_loop

Sets the loop region and turns looping on or off in a Lathe project. Specify a 1-based bar range to loop, or disable looping while keeping the saved region.

Instructions

Sets the loop region and turns looping on, or turns it off. The loop is saved with the project, like moving the loop brackets in Lathe. Bars are 1-based: from_bar 1 to_bar 5 loops the first four bars.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_loop"
  }
}

Input Schema

NameRequiredDescriptionDefault
onNofalse turns the loop off (the region is kept). Default true
to_barNoLoop end: the bar it jumps back from
from_barNoLoop start (1-based)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description usefully adds persistence – 'the loop is saved with the project' – which tells the agent the change survives save/reopen. However, it does not say what happens when on=true but the bar parameters are omitted, nor whether existing brackets are preserved in that case, which matters for a non-idempotent-flagged mutation.

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?

Two short sentences, front-loaded with the action and followed by the one clarifying example that matters. The Lathe analogy assumes host familiarity but costs only a few words. Nothing is padded or repeated from the schema verbatim.

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

Completeness4/5

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

For a three-parameter, fully documented, annotation-covered tool with no output schema, this is close to sufficient: it states the effect, the persistence, and the bar indexing convention. The one remaining hole is the partial-argument case (bars omitted while turning looping on), which an agent would have to guess at.

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

Parameters4/5

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

The schema already documents all three parameters at 100% coverage, so baseline is 3. The description earns above baseline by resolving a real ambiguity the schema leaves open: 'from_bar 1 to_bar 5 loops the first four bars' makes clear that to_bar is the bar jumped back from and not an inclusive endpoint. The Lathe bracket analogy reinforces the mental model.

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 uses a concrete verb and resource: 'Sets the loop region and turns looping on, or turns it off.' That is unambiguous about what state changes. It does not name or distinguish itself from any sibling, but no sibling in the given list engages the loop region, so confusion risk is low rather than zero.

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

Usage Guidelines3/5

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

Usage is implied rather than stated – an agent can infer this is the tool to reach for when loop playback is wanted. There is no explicit when-to-use/when-not guidance and no named alternative for related operations (e.g. transport or session editing). The bar example is illustrative, not routing guidance.

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