fetch_image
Retrieve images from URLs using the Discogs MCP Server. Input a valid URL to fetch and display images for music catalog management and search operations.
Instructions
Fetch an image by URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/tools/media.ts:13-24 (handler)The core handler implementation for the 'fetch_image' tool. It takes a URL parameter and returns the image content using the fastmcp library's imageContent function, with error handling.export const fetchImageTool: Tool<FastMCPSessionAuth, typeof MediaParamsSchema> = { name: 'fetch_image', description: 'Fetch an image by URL', parameters: MediaParamsSchema, 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 valid URL string.const MediaParamsSchema = z.object({ url: z.string().url(), });
- src/tools/media.ts:26-28 (registration)Registration function that adds the fetchImageTool to the FastMCP server.export function registerMediaTools(server: FastMCP): void { server.addTool(fetchImageTool); }
- src/tools/index.ts:23-23 (registration)Invocation of the media tools registration within the top-level registerTools function, which registers fetch_image among other tools.registerMediaTools(server);