Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

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

Implementation Reference

  • 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); } }, };
  • Zod schema defining the input parameters for the fetch_image tool: a valid URL string.
    const MediaParamsSchema = z.object({ url: z.string().url(), });
  • Registration function that adds the fetchImageTool to the FastMCP server.
    export function registerMediaTools(server: FastMCP): void { server.addTool(fetchImageTool); }
  • Invocation of the media tools registration within the top-level registerTools function, which registers fetch_image among other tools.
    registerMediaTools(server);

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