Skip to main content
Glama

fakestore_delete_product

Remove products from the Fake Store API by specifying product ID. This simulation tool helps manage e-commerce test data without persistent changes.

Instructions

Delete a product (simulation - does not persist)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesProduct ID to delete

Implementation Reference

  • The deleteProduct function that executes the core logic of deleting a product by ID via the FakeStore API delete endpoint.
    export async function deleteProduct(args: { id: number }): Promise<Product> { const { id } = args; validatePositiveInteger(id, 'Product ID'); return del<Product>(`/products/${id}`); }
  • Input schema definition and metadata for the fakestore_delete_product tool.
    { name: 'fakestore_delete_product', description: 'Delete a product (simulation - does not persist)', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Product ID to delete', }, }, required: ['id'], }, },
  • src/index.ts:109-114 (registration)
    Tool execution dispatcher that calls deleteProduct when fakestore_delete_product is invoked.
    if (name === 'fakestore_delete_product') { const result = await deleteProduct(args as { id: number }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • src/index.ts:40-44 (registration)
    Registers the fakestore_delete_product tool (via productTools) for listing available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [...productTools, ...cartTools, ...userTools], }; });

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/op-enny/mcp-server-fakestore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server