Skip to main content
Glama

check_inventory

Check current stock levels, reorder status, and supplier details for specific art supply products or categories to manage inventory effectively.

Instructions

Check current inventory levels for a specific product or category. Returns stock quantity, reorder status, and supplier information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYesProduct name, SKU, or category to search for

Implementation Reference

  • The handler function for the 'check_inventory' tool. It filters the mock inventory data based on the search parameter (product name, SKU, or category) and returns detailed stock information including low stock warnings.
    case 'check_inventory': { const search = String(args?.search || '').toLowerCase(); const results = storeData.inventory.filter(item => item.name.toLowerCase().includes(search) || item.id.toLowerCase().includes(search) || item.category.toLowerCase().includes(search) ); return { content: [{ type: 'text', text: results.length > 0 ? `Found ${results.length} item(s):\n\n${results.map(item => `${item.name} (${item.id})\n- Category: ${item.category}\n- Stock: ${item.quantity} units${item.quantity <= item.reorderLevel ? ' ⚠️ LOW STOCK' : ''}\n- Price: $${item.price}\n- Supplier: ${item.supplier}\n- Last Restocked: ${item.lastRestocked}` ).join('\n\n')}` : `No items found matching "${args?.search}"` }] }; }
  • The input schema definition for the 'check_inventory' tool, specifying a required 'search' string parameter.
    { name: 'check_inventory', description: 'Check current inventory levels for a specific product or category. Returns stock quantity, reorder status, and supplier information.', inputSchema: { type: 'object', properties: { search: { type: 'string', description: 'Product name, SKU, or category to search for' }, }, required: ['search'], }, },
  • src/index.ts:516-518 (registration)
    Registration of all tools including 'check_inventory' via the ListToolsRequestSchema handler that returns the tools array containing the tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/wspotter/mcpart'

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