Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

create_marketplace_listing

Create a new marketplace listing on Discogs by specifying release ID, condition, price, and status. Manage music catalog entries with ease using predefined parameters for streamlined selling.

Instructions

Create a new marketplace listing

Input Schema

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

Implementation Reference

  • The main handler for the 'create_marketplace_listing' tool. It instantiates MarketplaceService and calls createListing with the input args, returning the JSON stringified response.
    export const createMarketplaceListingTool: Tool<FastMCPSessionAuth, typeof ListingNewParamsSchema> = { name: 'create_marketplace_listing', description: 'Create a new marketplace listing', parameters: ListingNewParamsSchema, execute: async (args) => { try { const marketplaceService = new MarketplaceService(); const listing = await marketplaceService.createListing(args); return JSON.stringify(listing); } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod schema defining the input parameters for the create_marketplace_listing tool.
    export const ListingNewParamsSchema = z.object({ release_id: z.number().int(), condition: ConditionSchema, sleeve_condition: SleeveConditionSchema.optional(), price: z.number(), comments: z.string().optional(), allow_offers: z.boolean().optional(), status: SaleStatusSchema, external_id: z.string().optional(), location: z.string().optional(), weight: z.number().optional(), format_quantity: z.number().optional(), });
  • Registers the createMarketplaceListingTool (and other marketplace tools) 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 MarketplaceService method that handles the actual API call to create a listing via POST /marketplace/listings.
    async createListing(params: ListingNewParams): Promise<ListingNewResponse> { try { const response = await this.request<ListingNewResponse>(`/listings`, { method: 'POST', body: params, }); const validatedResponse = ListingNewResponseSchema.parse(response); return validatedResponse; } catch (error) { if (isDiscogsError(error)) { throw error; } throw new Error(`Failed to create listing: ${String(error)}`); } }

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