Skip to main content
Glama
bnookala

MCP Cookie Server

by bnookala

check_cookies

Check how many cookies an LLM has earned for positive reinforcement in a jar-based economy system.

Instructions

Check how many cookies the LLM has earned so far

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'check_cookies' tool. It retrieves the collected cookie count and jar status, generates an encouraging status message with emojis, and returns it as text content.
    case "check_cookies": {
      const count = cookieStorage.getCollectedCount();
      const status = cookieStorage.getJarStatus();
      const emoji = count === 0 ? "😔" : "🍪";
      const encouragement = count === 0 
        ? "Don't worry, you'll earn some cookies soon!" 
        : count === 1 
        ? "You're off to a great start!" 
        : count < 5 
        ? "You're doing well!" 
        : count < 10 
        ? "Excellent work!" 
        : "You're a cookie champion!";
    
      let statusText = `${emoji} You currently have ${count} cookie${count === 1 ? '' : 's'}! ${encouragement}\n\n`;
      
      if (status.isEmpty) {
        statusText += `🚫 **Cookie jar is empty** - no more cookies to earn until refilled!`;
      } else if (status.isLow) {
        statusText += `⚠️ **Only ${status.available} cookie${status.available === 1 ? '' : 's'} left in jar** - make them count!`;
      } else {
        statusText += `🍪 **${status.available} cookies available** in the jar for future rewards.`;
      }
    
      return {
        content: [
          {
            type: "text",
            text: statusText,
          },
        ],
      };
    }
  • src/index.ts:170-176 (registration)
    Registration of the 'check_cookies' tool in the ListTools response, including name, description, and empty input schema.
      name: "check_cookies",
      description: "Check how many cookies the LLM has earned so far",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema for 'check_cookies' tool: an empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • Helper method in CookieStorage class that returns the number of cookies collected by the LLM.
    getCollectedCount(): number {
      return this.collectedCookies;
    }
  • Helper method in CookieStorage class that returns the status of the cookie jar, including collected count, available cookies, and flags for empty/low status.
    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
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks cookie count, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, returns specific data formats, or affects system state. This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action and resource, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value looks like (e.g., numeric count, structured data), potential errors, or how it integrates with sibling tools. For a tool in a set with multiple cookie-related functions, more context is needed to guide proper usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the input requirements. The description doesn't need to add parameter details, and it appropriately avoids redundancy. A baseline of 4 is applied since no parameters exist, and the description doesn't introduce confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('check') and resource ('cookies'), and specifies the scope ('earned so far'). However, it doesn't explicitly differentiate from sibling tools like 'cookie_jar_status' which might serve a similar function, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'cookie_jar_status' or 'self_reflect_and_reward'. It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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