Skip to main content
Glama

fakestore_get_categories

Retrieve all available product categories from the Fake Store API to browse and filter e-commerce inventory efficiently.

Instructions

Get all available product categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that fetches product categories from the FakeStore API endpoint '/products/categories' using the 'get' utility.
    /** * Get all product categories */ export async function getCategories(): Promise<string[]> { return get<string[]>('/products/categories'); }
  • The tool schema definition including name, description, and empty input schema (no parameters required).
    { name: 'fakestore_get_categories', description: 'Get all available product categories', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:68-73 (registration)
    The registration in the main tool call handler that maps the tool name to the getCategories function execution and formats the JSON 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