fetch_image
Retrieve images from URLs to display album art, artist photos, or release graphics within the Discogs music catalog system.
Instructions
Fetch an image by URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/tools/media.ts:17-23 (handler)The execute handler function for the 'fetch_image' tool, which fetches an image from the given URL using the imageContent helper from fastmcp and handles errors.execute: async ({ url }) => { try { return imageContent({ url }); } catch (error) { throw formatDiscogsError(error); } },
- src/tools/media.ts:6-8 (schema)Zod schema defining the input parameters for the fetch_image tool: a required 'url' string that must be a valid URL.const MediaParamsSchema = z.object({ url: z.string().url(), });
- src/tools/media.ts:26-28 (registration)Function that registers the fetchImageTool (named 'fetch_image') with the FastMCP server instance.export function registerMediaTools(server: FastMCP): void { server.addTool(fetchImageTool); }