Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

update_marketplace_listing

Modify a marketplace listing on Discogs by updating details such as condition, price, status, and additional metadata to ensure accurate and up-to-date listings.

Instructions

Update a marketplace listing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allow_offersNo
commentsNo
conditionYes
external_idNo
format_quantityNo
listing_idYes
locationNo
priceYes
release_idYes
sleeve_conditionNo
statusYes
weightNo

Implementation Reference

  • MCP tool object defining the 'update_marketplace_listing' tool, including name, description, parameters schema, and execute handler that calls MarketplaceService.updateListing(args).
    export const updateMarketplaceListingTool: Tool< FastMCPSessionAuth, typeof ListingUpdateParamsSchema > = { name: 'update_marketplace_listing', description: 'Update a marketplace listing', parameters: ListingUpdateParamsSchema, execute: async (args) => { try { const marketplaceService = new MarketplaceService(); await marketplaceService.updateListing(args); return 'Listing updated successfully'; } catch (error) { throw formatDiscogsError(error); } }, };
  • Core implementation in MarketplaceService.updateListing method, which sends a POST request to Discogs API endpoint `/listings/${listing_id}` with the update body.
    async updateListing({ listing_id, ...body }: ListingUpdateParams): Promise<void> { try { await this.request<void>(`/listings/${listing_id}`, { method: 'POST', body, }); } catch (error) { if (isDiscogsError(error)) { throw error; } throw new Error(`Failed to update listing: ${String(error)}`); } }
  • Input schema for the tool: ListingUpdateParamsSchema, merging ListingIdParamSchema (listing_id) with ListingNewParamsSchema (update fields).
    export const ListingUpdateParamsSchema = ListingIdParamSchema.merge(ListingNewParamsSchema);
  • Tool registration call within registerMarketplaceTools function.
    server.addTool(updateMarketplaceListingTool);

Other Tools

Related Tools

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