Skip to main content
Glama

humanize

Add natural timing variation to music patterns by setting a humanization level from 0 to 1.

Instructions

Add human timing variation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoHumanization amount (0-1)

Implementation Reference

  • The execute handler for the 'humanize' tool. Reads the current pattern, validates the optional 'amount' argument (0-1 normalized), defaults to 0.01 if not provided, and appends '.nudge(rand.range(-amount, amount))' to introduce human timing variation.
    case 'humanize': {
      if (args.amount !== undefined) InputValidator.validateNormalizedValue(args.amount, 'amount');
      const p = await ctx.getCurrentPatternSafe();
      const amt = args.amount || 0.01;
      await ctx.writePatternSafe(p + `.nudge(rand.range(-${amt}, ${amt}))`);
      return 'Added human timing';
    }
  • The MCP tool schema definition for 'humanize'. Declares name, description ('Add human timing variation'), and inputSchema with an optional 'amount' parameter of type number (0-1).
    {
      name: 'humanize',
      description: 'Add human timing variation',
      inputSchema: {
        type: 'object',
        properties: { amount: { type: 'number', description: 'Humanization amount (0-1)' } },
      },
    },
  • The 'humanize' tool is registered on the MCP server by spreading transformModule.tools into the server's tool list (line 109). The dispatcher routes to transformModule.execute when the tool name is in transformModule.toolNames (lines 378-379).
    // transform + effect + shape + set_tempo — extracted to src/server/tools/transform.ts (#104)
    ...transformModule.tools,
  • Uses InputValidator.validateNormalizedValue (src/utils/InputValidator.ts:278-290) to validate the 'amount' parameter is between 0 and 1.
    case 'humanize': {
      if (args.amount !== undefined) InputValidator.validateNormalizedValue(args.amount, 'amount');
      const p = await ctx.getCurrentPatternSafe();
      const amt = args.amount || 0.01;
      await ctx.writePatternSafe(p + `.nudge(rand.range(-${amt}, ${amt}))`);
      return 'Added human timing';
    }
  • The transformModule object is exported from transform.ts, bundling tools (including 'humanize'), toolNames, and the execute dispatcher.
    export const transformModule: ToolModule = { tools, toolNames, execute };
Behavior2/5

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

With no annotations, the description carries the full burden. It only says 'Add human timing variation' without disclosing whether the operation is destructive, reversible, or what elements it affects. This is insufficient for understanding side effects.

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 a single, concise phrase with no wasted words. It is front-loaded and efficient.

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?

For a simple tool with one parameter and no output schema, the description is minimal but somewhat adequate. However, it lacks any behavioral context (e.g., effect on existing patterns, repeatability) that would make it more complete.

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?

The input schema has 100% description coverage for the single parameter 'amount', with the description 'Humanization amount (0-1)'. The main description adds no extra meaning beyond what the schema provides, so baseline score of 3 is appropriate.

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 'Add human timing variation' clearly states the action (add) and the resource (human timing variation), but does not explicitly differentiate from siblings like 'add_swing' or 'quantize'. It is sufficiently clear for a simple tool.

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?

No usage guidance is provided. There is no mention of when to use this tool versus alternatives or any prerequisites. A single sentence with no context for decision-making.

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/williamzujkowski/live-coding-music-mcp'

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