Skip to main content
Glama

run_in_buffer

Run Ruby code in a specified Sonic Pi buffer (0-9) to organize live_loops across multiple slots, mirroring GUI buffer tabs.

Instructions

Save and run code in a specific Sonic Pi buffer slot (0-9).

Mirrors the GUI buffer tabs. Useful for organizing live_loops across multiple slots.

Args: buffer_id: Buffer index 0-9 code: The Sonic Pi Ruby code to run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
buffer_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries full burden but only states 'Save and run code' without disclosing important behaviors such as whether it overwrites existing code, stops current execution, or requires specific permissions. This leaves significant ambiguity.

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

Conciseness5/5

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

The description is very concise with a two-sentence summary followed by parameter details. No unnecessary words, front-loaded with the action.

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?

The description covers basic parameter semantics and a usage hint, but lacks details on output, error handling, or side effects. Given the tool's simplicity and the presence of an output schema (unseen), a score of 3 is reasonable—adequate but with gaps.

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?

Despite 0% schema description coverage, the description explicitly explains both parameters: buffer_id as 'Buffer index 0-9' and code as 'The Sonic Pi Ruby code to run', adding meaningful context beyond the schema's type-only definitions.

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 clearly states the tool saves and runs code in a specific Sonic Pi buffer slot (0-9), which is a specific verb+resource. It distinguishes from sibling 'run_code' by targeting a buffer slot.

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?

The description mentions it mirrors GUI buffer tabs and is useful for organizing live_loops across multiple slots, implying usage context. However, it does not explicitly state when to use this tool versus the sibling 'run_code' or provide exclusion criteria.

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/AJBogo9/sonic-mcp'

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