Skip to main content
Glama

resize_media_item

Adjust the duration of media items in REAPER projects by specifying track and item indices with the desired length in seconds.

Instructions

Change the length of a media item (seconds).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
lengthYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler for 'resize_media_item', registered with @mcp.tool().
    def resize_media_item(
        track_index: int,
        item_index: int,
        length: float,
    ) -> dict[str, Any]:
        """Change the length of a media item (seconds)."""
        try:
            return _wrap(
                adapter.resize_media_item(
                    track_index=track_index, item_index=item_index, length=length
                )
            )
        except Exception as exc:
            return _err(exc)
  • The adapter method that delegates the resize_media_item call to the bridge client.
    def resize_media_item(
        self, track_index: int, item_index: int, length: float
    ) -> dict[str, Any]:
        return self._client.call(
            "resize_media_item",
            track_index=track_index,
            item_index=item_index,
            length=length,
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'change' implies mutation, it fails to disclose whether this stretches audio, trims content, affectsRipple/follow-on items, or whether the operation is reversible.

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?

Extremely concise single sentence that is front-loaded with the action. However, given the 0% schema coverage and lack of annotations, this brevity becomes under-specification rather than efficient communication.

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?

Insufficient for a 3-parameter mutation tool. Despite having an output schema, the description omits critical context: how to locate valid indices (should reference get_track_items), whether indices are 0-based, and what happens to audio material when resized.

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?

With 0% schema description coverage, the description partially compensates by clarifying the unit for 'length' (seconds). However, it leaves track_index and item_index completely unexplained despite these being critical identifiers; adding context that these indices locate the item within the project would improve this.

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?

States specific action (change length), target resource (media item), and unit (seconds). The mention of 'seconds' distinguishes temporal duration from positional moves (e.g., vs move_media_item), though it could explicitly clarify this changes duration rather than position.

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?

Provides no guidance on when to use versus alternatives (e.g., when to use this vs move_media_item or duplicate_item), and fails to mention prerequisites like obtaining valid track_index/item_index values from get_track_items.

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/danielkinahan/ReaMCP'

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