Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

update_marketplace_listing

Modify existing marketplace listings on Discogs by updating details like condition, price, and status to maintain accurate inventory.

Instructions

Update a marketplace listing

Input Schema

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

Implementation Reference

  • The tool handler (execute function) for 'update_marketplace_listing'. It instantiates MarketplaceService and calls its updateListing method with the input 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); } }, };
  • Zod schema definition for input parameters of the update_marketplace_listing tool, merging ListingIdParamSchema and ListingNewParamsSchema.
    export const ListingUpdateParamsSchema = ListingIdParamSchema.merge(ListingNewParamsSchema);
  • Registration function that adds the updateMarketplaceListingTool (among others) to the FastMCP server.
    export function registerMarketplaceTools(server: FastMCP): void { server.addTool(getUserInventoryTool); server.addTool(getMarketplaceListingTool); server.addTool(createMarketplaceListingTool); server.addTool(updateMarketplaceListingTool); server.addTool(deleteMarketplaceListingTool); server.addTool(getMarketplaceOrderTool); server.addTool(editMarketplaceOrderTool); server.addTool(getMarketplaceOrdersTool); server.addTool(getMarketplaceOrderMessagesTool); server.addTool(createMarketplaceOrderMessageTool); server.addTool(getMarketplaceReleaseStatsTool); }
  • The supporting method in MarketplaceService that performs the actual Discogs API POST request to update the listing.
    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)}`); } }

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