Skip to main content
Glama
j0KZ
by j0KZ

generate_patch

Convert a JSON specification of nodes and connections into a valid Pure Data patch file. Returns the complete .pd file content.

Instructions

Generate a valid Pure Data .pd file from a JSON specification of nodes and connections. The complete .pd file content is ALWAYS returned in the response — present it directly to the user. STOP after presenting the result. Do NOT run bash, ls, mkdir, cat, cp, mv, or ANY file/shell operations after this tool. For message boxes (type: 'msg'), use '\,' as a separate arg for multi-segment messages (e.g. ADSR: args: [0, '\,', 1, 10, '\,', 0.7, 100, '\,', 0, 200]). Bare commas are auto-escaped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoTitle comment placed at the top of the patch.
nodesYesList of nodes to place in the patch.
connectionsNoConnections between nodes.
outputPathNoOptional ABSOLUTE file path to write the .pd file. Only use if the user explicitly requests saving to a specific path. The .pd content is always returned in the response regardless.
Behavior3/5

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

No annotations provided, so description carries burden. It warns against post-tool shell operations but does not disclose side effects like file overwriting when outputPath is given, error handling, or permissions needed.

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?

Description is four sentences, front-loaded with purpose, and each sentence adds necessary guidance. Could be slightly more concise but no unnecessary words.

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?

Given the tool's complexity and lack of output schema, the description covers key aspects: always returns content, how to handle it, post-tool warnings, and parameter special cases. Lacks error handling details but schema covers validation.

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?

Schema coverage is 100%, so baseline is 3. The description adds value by clarifying that outputPath should only be used when user explicitly requests it, and provides special arg formatting for message boxes, going beyond schema descriptions.

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 it generates a valid Pure Data .pd file from a JSON specification, distinguishing it from sibling tools like analyze_patch or validate_patch.

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?

Provides explicit instructions to present the returned content directly to the user, stop after presenting, and avoids any shell operations. Also gives specific formatting advice for message boxes. Lacks mention of when not to use, but coverage is strong.

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/j0KZ/synthlab-mcp-server'

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