create_object
Create a new Pure Data object at a given position with specified type and arguments, and receive a unique ID for later connections and modifications.
Instructions
Create a new Pd object.
This tool creates a new object in the Pure Data patch at the specified position.
The object can be any valid Pd object type (e.g., osc~, dac~) with optional arguments.
The implementation handles:
1. Creating the object in Pure Data via OSC
2. Assigning a unique numeric index to the object for connection tracking
3. Returning an object_id that can be used in subsequent API calls
The object_id follows the format "{object_type}_{x}_{y}" to provide
a predictable way to reference objects.
Args:
object_type: Type of Pd object (e.g., osc~, dac~)
args: Arguments for the object (e.g., ["440"] for an oscillator)
position: Position on the canvas (x, y coordinates)
ctx: MCP context
Returns:
Response with object ID and status
Example:
create_object("osc~", ["440"], {"x": 100, "y": 100}, ctx)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"object_type": "<object_type>",
"args": "<args>",
"position": "<position>"
},
"name": "create_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | ||
| position | Yes | ||
| object_type | Yes |