Skip to main content
Glama
wegitor
by wegitor

set_item_length

Adjust a media item's length in REAPER by specifying seconds or musical measures, with items identified by track index and either position or direct ID.

Instructions

Set the length of a media item.

Item Identification - Accepts BOTH types:

  • track_pos_idx (integer): Simple index like 0, 1, 2

  • direct_item_id (string): Internal ID like "MediaItem*0x..."

Args: track_index: Index of the track item_id: EITHER integer track_pos_idx OR string direct_item_id length_time: Length in seconds from start of item (optional if length_measure is provided) length_measure: Length as "measure:beat,fraction" from start of item(optional if length_time is provided)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes
length_timeNo
track_indexYes
length_measureNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains item identification and length formats, but does not state whether setting the length mutates the item destructively, what happens if both length_time and length_measure are provided, or what error conditions exist (e.g., nonexistent track/item). This is a significant gap for a mutation tool.

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?

The description is well-structured and front-loaded with the main purpose, followed by compact bullet lists for item identification and arguments. It is appropriately sized for the tool's complexity, though a minor typo ('item(optional') and slight redundancy ('from start of item') could be cleaned up.

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

Completeness3/5

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

Given the tool has 4 parameters with dual ID types and optional length specifications, the description covers the core usage patterns well. However, it omits edge cases such as behavior when neither length_time nor length_measure is supplied, or when both are supplied. The output schema exists, so return values are handled externally, but behavioral edge cases remain unaddressed.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by clearly explaining track_index, item_id (including both valid types), length_time (seconds from start), and length_measure (measure:beat,fraction format). It also clarifies the optional relationship between length_time and length_measure, which is impossible to derive from the schema alone.

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

Purpose5/5

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

The description begins with 'Set the length of a media item,' a specific verb+resource combination that clearly defines the tool's function. It also distinguishes itself from sibling tools like set_item_position (which deals with position) by specifying 'length' as the target attribute.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: whenever you need to change a media item's length. It also explains how to specify length via two alternative parameters (length_time and length_measure) and how to identify items using either an integer index or a string ID. It does not explicitly mention alternatives or exclusions, but the scope is unambiguous.

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/wegitor/reaper-reapy-mcp'

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