update_preset
Modify an image transform preset's name or processing parameters like dimensions, format, and effects within the Spronta MCP Server.
Instructions
Update a preset's name or transforms.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID (UUID). If omitted, uses SPRONTA_PROJECT_ID env var. | |
| presetId | Yes | Preset ID (UUID) | |
| name | No | New name | |
| transforms | No | Image transform parameters |
Implementation Reference
- src/index.ts:206-218 (handler)The handler logic for the update_preset tool, which performs a PATCH request to the API.
case "update_preset": { const pid = getProjectId(args); const body: Record<string, unknown> = {}; if (args.name !== undefined) body.name = args.name; if (args.transforms !== undefined) body.transforms = args.transforms; return ok( await api.request( "PATCH", `/images/projects/${pid}/presets/${args.presetId}`, body, ), ); } - src/tools.ts:243-256 (schema)The schema definition for the update_preset tool, specifying the input parameters and description.
{ name: "update_preset", description: "Update a preset's name or transforms.", inputSchema: { type: "object", properties: { ...projectIdParam, presetId: { type: "string", description: "Preset ID (UUID)" }, name: { type: "string", description: "New name" }, transforms: transformsSchema, }, required: ["presetId"], }, },