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
| Name | Required | Description | Default |
|---|---|---|---|
| allow_offers | No | ||
| comments | No | ||
| condition | Yes | ||
| external_id | No | ||
| format_quantity | No | ||
| listing_id | Yes | ||
| location | No | ||
| price | Yes | ||
| release_id | Yes | ||
| sleeve_condition | No | ||
| status | Yes | ||
| weight | No |
Implementation Reference
- src/tools/marketplace.ts:221-238 (handler)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); } }, };
- src/services/marketplace.ts:282-295 (helper)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)}`); } }
- src/types/marketplace.ts:190-190 (schema)Input schema for the tool: ListingUpdateParamsSchema, merging ListingIdParamSchema (listing_id) with ListingNewParamsSchema (update fields).export const ListingUpdateParamsSchema = ListingIdParamSchema.merge(ListingNewParamsSchema);
- src/tools/marketplace.ts:244-244 (registration)Tool registration call within registerMarketplaceTools function.server.addTool(updateMarketplaceListingTool);