Skip to main content
Glama
bnookala
by bnookala

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: {}, }, },
  • Input schema for the 'cookie_jar_status' tool, which requires no parameters.
    inputSchema: { type: "object", properties: {}, }, },
  • 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 }; }

Other Tools

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

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