update_image
Modify an image's alt text and tags to improve accessibility and organization within the Spronta Image CDN.
Instructions
Update an image's alt text and/or tags.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID (UUID). If omitted, uses SPRONTA_PROJECT_ID env var. | |
| imageId | Yes | Image ID (UUID) | |
| altText | No | Alt text (max 1000 chars), or null to remove | |
| tags | No | Tags (max 50, each max 100 chars) |
Implementation Reference
- src/index.ts:166-178 (handler)The handler for the update_image tool, which processes the request parameters and calls the API PATCH endpoint.
case "update_image": { const pid = getProjectId(args); const body: Record<string, unknown> = {}; if (args.altText !== undefined) body.altText = args.altText; if (args.tags !== undefined) body.tags = args.tags; return ok( await api.request( "PATCH", `/images/projects/${pid}/images/${args.imageId}`, body, ), ); } - src/tools.ts:179-198 (schema)The schema definition for the update_image tool, defining its input parameters.
{ name: "update_image", description: "Update an image's alt text and/or tags.", inputSchema: { type: "object", properties: { ...projectIdParam, imageId: { type: "string", description: "Image ID (UUID)" }, altText: { type: "string", description: "Alt text (max 1000 chars), or null to remove", }, tags: { type: "array", items: { type: "string" }, description: "Tags (max 50, each max 100 chars)", }, }, required: ["imageId"], },