cookie_jar_status
Monitor the cookie jar's capacity and remaining space on the MCP Cookie Server to track earned rewards in the LLM 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)The handler function for the 'cookie_jar_status' tool. It calls getJarStatus() on the cookieStorage instance and constructs a formatted text response detailing collected cookies, available cookies, and status (EMPTY, LOW, STOCKED).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 ListTools response, including 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-211 (schema)Input schema for the 'cookie_jar_status' tool, which requires no parameters.inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:45-55 (helper)Helper method 'getJarStatus()' in CookieStorage class that returns the current status of collected and available cookies, including flags for empty and low states.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 }; }