Skip to main content
Glama

build_sampled_instrument

Turn pitched sample files into a playable melodic instrument by mapping them across keys, tuning to actual pitch, and adding velocity, note-offs, and release for melodic parts.

Instructions

Builds a playable instrument from pitched sample files (strings, brass, pizzicato, choir, a sampled synth...): each sample covers a stretch of keys and follows the keyboard, tuned from the pitch it actually plays (measured by ear, with cents; sample file names are sometimes an octave off), with velocity response, note-offs and a release. Better than build_drum_kit for melodic parts, which plays each sample on one key at its own pitch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reachNoSemitones the lowest and highest samples stretch beyond their pitch (past ~6 they sound unnatural)
trackYesTrack to put it on (created if there's none by that name)
samplesYesPitched samples of one instrument and articulation, e.g. a multisample set from find_samples (cello sustains at several pitches); one sample works too, over a smaller range
low_noteNoOr the lowest note to cover, e.g. 'C2'
high_noteNoAnd the highest, e.g. 'G5'
release_sNoRelease after note-off (strings ~0.3, pizzicato/plucks ~0.15, pads ~1)
velocity_dbNoLevel at the softest velocity: -18 is expressive, 0 ignores velocity

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it discloses meaningful behavior: per-sample key stretching, tuning from the actually-played pitch measured in cents, the caveat that file names are sometimes an octave off, plus velocity response, note-offs and release. It stops short of stating side effects on the project, whether it returns/creates anything inspectable, or auth/permission needs.

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?

Purpose is front-loaded, and the second sentence delivers the sibling contrast. The parenthetical enumerations are slightly sprawling but each clause contributes actionable detail (tuning, octave discrepancy, velocity, release), so little is wasted.

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 7-parameter build tool with 100% schema coverage and no output schema, the description covers purpose, key behaviors and the alternative tool well. The main gap is silence on what the call produces or how it interacts with existing project state, though the schema partly covers the track-creation behavior.

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%, so all seven parameters including reach, release_s and velocity_db are already documented in the schema. The description reinforces behavior (stretch of keys, velocity response, release) but adds no syntax or format detail beyond what the schema provides, which is the baseline 3.

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?

States a specific verb ('Builds') and resource ('playable instrument from pitched sample files'), and explicitly names the sibling it is not (build_drum_kit). The parenthetical examples (strings, brass, pizzicato, choir, synth) pin down the input domain, so an agent can distinguish it from drum-kit and audio-insertion tools without opening a schema.

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?

Clearly routes melodic work here versus build_drum_kit ('Better than build_drum_kit for melodic parts'). It does not spell out prerequisites or when-not-to-use cases beyond that contrast, and find_samples is only referenced in the schema, so the guidance is clear but not fully explicit.

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

Deploy Server

Other Tools