Skip to main content
Glama
bnookala
by bnookala

cookie_jar_status

Check cookie jar capacity and remaining space to monitor available treats in the MCP Cookie Server's reinforcement system.

Instructions

Check the current status of the cookie jar including capacity and remaining space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the cookie_jar_status tool that calls getJarStatus on the CookieStorage instance and formats a detailed status message based on availability.
    case "cookie_jar_status": { const status = cookieStorage.getJarStatus(); let statusText = `๐Ÿบ **Cookie Jar Status:**\n\n`; statusText += `**Collected Cookies:** ${status.collected}\n`; statusText += `**Available in Jar:** ${status.available}\n`; if (status.isEmpty) { statusText += `**Status:** ๐Ÿ”ด EMPTY\n\n`; statusText += `The cookie jar is completely empty! No more cookies can be awarded until a user refills it.`; } else if (status.isLow) { statusText += `**Status:** โš ๏ธ LOW\n\n`; statusText += `Warning: Only ${status.available} cookie${status.available === 1 ? '' : 's'} left! Each cookie is now extremely precious.`; } else { statusText += `**Status:** ๐ŸŸข STOCKED\n\n`; statusText += `The jar has ${status.available} cookie${status.available === 1 ? '' : 's'} available for earning through quality work.`; } return { content: [ { type: "text", text: statusText, }, ], }; }
  • src/index.ts:204-211 (registration)
    Registration of the cookie_jar_status tool in the ListToolsRequestSchema handler, defining its name, description, and empty input schema.
    { name: "cookie_jar_status", description: "Check the current status of the cookie jar including capacity and remaining space", inputSchema: { type: "object", properties: {}, }, },
  • Input schema for the cookie_jar_status tool, which requires no parameters.
    inputSchema: { type: "object", properties: {}, },
  • Core helper method in CookieStorage class that returns the status object (collected, available, isEmpty, isLow) used directly by the tool handler.
    getJarStatus(): { collected: number; available: number; isEmpty: boolean; isLow: boolean } { const isEmpty = this.jarCookies <= 0; const isLow = this.jarCookies > 0 && this.jarCookies <= 2; return { collected: this.collectedCookies, available: this.jarCookies, isEmpty, isLow }; }

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/bnookala/mcp-cookiejar'

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