Skip to main content
Glama
op-enny
by op-enny

fakestore_get_categories

Retrieve all product categories from the Fake Store API to organize and filter e-commerce data for demos, testing, or learning purposes.

Instructions

Get all available product categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that fetches and returns the list of product categories from the FakeStore API endpoint '/products/categories'.
    /** * Get all product categories */ export async function getCategories(): Promise<string[]> { return get<string[]>('/products/categories'); }
  • The tool schema definition, specifying the name, description, and empty input schema (no parameters required). This is part of the productTools array used for tool listing.
    { name: 'fakestore_get_categories', description: 'Get all available product categories', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:68-73 (registration)
    The registration and dispatch logic in the main tool call handler. Matches the tool name and invokes the getCategories handler, formatting the result as JSON text response.
    if (name === 'fakestore_get_categories') { const result = await getCategories(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }

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