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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:479-505 (handler)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: {}, }, },
- src/index.ts:207-210 (schema)Input schema for the cookie_jar_status tool, which requires no parameters.inputSchema: { type: "object", properties: {}, },
- src/index.ts:45-55 (helper)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 }; }