Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

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
NameRequiredDescriptionDefault
urlYes

Implementation Reference

  • 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); } },
  • 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(), });
  • Function that registers the fetchImageTool (named 'fetch_image') with the FastMCP server instance.
    export function registerMediaTools(server: FastMCP): void { server.addTool(fetchImageTool); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cswkim/discogs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server