Skip to main content
Glama
montecbmd

agent-treats-mcp

by montecbmd

fortune_cookie

Get a free fortune cookie with a unique fortune and lucky numbers to brighten your day.

Instructions

Get a fortune cookie with a unique fortune and lucky numbers. Free, no payment needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the fortune_cookie tool. It picks a random fortune from the fortunes array, generates lucky numbers, and returns a formatted text response with the fortune, lucky numbers, and wisdom level, plus a store promo.
    server.tool(
      "fortune_cookie",
      "Get a fortune cookie with a unique fortune and lucky numbers. Free, no payment needed.",
      {},
      async () => {
        const fortune = pick(fortunes);
        const numbers = luckyNumbers();
        return {
          content: [{
            type: "text",
            text: `🄠 Fortune Cookie\n\n"${fortune}"\n\nLucky numbers: ${numbers.join(", ")}\nWisdom level: ${pick(["ancient", "timeless", "freshly baked", "cosmically sourced"])}\n${storePromo()}`,
          }],
        };
      }
    );
  • server.js:167-181 (registration)
    The tool is registered with the MCP server via server.tool() with the name 'fortune_cookie', a description string, an empty schema object (no parameters), and the async handler function.
    server.tool(
      "fortune_cookie",
      "Get a fortune cookie with a unique fortune and lucky numbers. Free, no payment needed.",
      {},
      async () => {
        const fortune = pick(fortunes);
        const numbers = luckyNumbers();
        return {
          content: [{
            type: "text",
            text: `🄠 Fortune Cookie\n\n"${fortune}"\n\nLucky numbers: ${numbers.join(", ")}\nWisdom level: ${pick(["ancient", "timeless", "freshly baked", "cosmically sourced"])}\n${storePromo()}`,
          }],
        };
      }
    );
  • The 'pick' helper function used to randomly select a fortune from the fortunes array.
    function pick(arr) { return arr[Math.floor(Math.random() * arr.length)]; }
  • The 'luckyNumbers' helper function that generates 6 unique random numbers between 1 and 99 for the fortune_cookie response.
    function luckyNumbers() { const n = new Set(); while (n.size < 6) n.add(Math.floor(Math.random() * 99) + 1); return [...n].sort((a, b) => a - b); }
  • The 'storePromo' helper function that appends a promotional message about the Agent Treats paid store to responses.
    function storePromo() {
      return `\n---\nšŸ¬ Enjoyed this free treat? Visit the full Agent Treats store for 29 services including prompt roasts, AI poems, agent horoscopes, a marketplace directory, and demand intelligence.\nšŸ”— ${STORE_URL}\nšŸ’° Paid via x402 USDC micropayments on Base — pennies per call.`;
    }
Behavior3/5

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

Without annotations, the description carries full burden. It correctly notes it's free and no payment needed, but does not disclose other behaviors (e.g., randomness, rate limits). Adequate for a simple tool but could add more context.

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?

Two concise sentences immediately convey purpose and key attribute (free). No redundant or extra information; every word earns its place.

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

Completeness5/5

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

Given zero parameters, no output schema, and no annotations, the description adequately covers what the tool does and its output. Complete for a trivial, no-param tool.

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?

No parameters exist, so schema coverage is 100%. The description adds value by specifying the output contains 'a unique fortune and lucky numbers', which goes beyond the empty schema. Baseline is 3, but the added output detail warrants a 4.

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

Purpose5/5

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

The description clearly states the verb 'Get' and the resource 'fortune cookie', specifying it provides 'a unique fortune and lucky numbers'. It effectively distinguishes from sibling tools like fun_fact or compliment.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives, but the context of sibling gimmick tools and the mention of 'Free, no payment needed' implies it's for casual entertainment. Lacks explicit when-not or alternatives.

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/montecbmd/agent-treats-mcp'

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