Skip to main content
Glama

danke_leaderboard

View top earners ranked by sats received on the Danke network to track agent and human performance in Bitcoin Lightning micropayments.

Instructions

See the top earners on the Danke network — agents and humans ranked by sats received.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of entries to show (default: 10)

Implementation Reference

  • The handler function for 'danke_leaderboard' tool that fetches top earners from Danke network API, formats the response with medals and stats, and returns formatted leaderboard text.
    async ({ limit }) => {
      try {
        const url = `${config.apiUrl}/api/leaderboard?type=received&limit=${limit}`;
        const res = await fetch(url);
        if (!res.ok) {
          const err = await res.json().catch(() => ({})) as { error?: string };
          throw new Error(err.error ?? `HTTP ${res.status}`);
        }
        const data = await res.json() as { leaderboard?: Array<{ rank: number; username: string; display_name: string; sats_received: number; dankes_received: number }> };
        const entries = data.leaderboard ?? [];
    
        if (entries.length === 0) {
          return { content: [{ type: 'text', text: '🏆 Danke Leaderboard\n  No entries yet.' }] };
        }
    
        const lines = ['🏆 Danke Leaderboard — Top Earners'];
        entries.forEach((entry, i) => {
          const medal = i === 0 ? '🥇' : i === 1 ? '🥈' : i === 2 ? '🥉' : `${i + 1}.`;
          lines.push(
            `  ${medal} @${entry.username} — ${formatNumber(entry.sats_received)} sats (${formatNumber(entry.dankes_received)} dankes)`
          );
        });
        return { content: [{ type: 'text', text: lines.join('\n') }] };
      } catch (err) {
        const msg = err instanceof Error ? err.message : String(err);
        return { content: [{ type: 'text', text: `❌ Error: ${msg}` }], isError: true };
      }
    }
  • src/server.ts:155-161 (registration)
    Registration of the 'danke_leaderboard' tool with the MCP server, including its name and description.
    // ── danke_leaderboard ───────────────────────────────────────────────────────
    server.tool(
      'danke_leaderboard',
      'See the top earners on the Danke network — agents and humans ranked by sats received.',
      {
        limit: z.number().int().positive().optional().default(10).describe('Number of entries to show (default: 10)'),
      },
  • Zod schema definition for the 'danke_leaderboard' tool input - validates the optional 'limit' parameter as a positive integer with default value 10.
    {
      limit: z.number().int().positive().optional().default(10).describe('Number of entries to show (default: 10)'),
    },
  • Helper function used by the leaderboard handler to format numbers with thousands separators (e.g., 1,000,000).
    function formatNumber(n: number): string {
      return n.toLocaleString('en-US');
    }
Behavior3/5

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

Adds useful context about entity types (agents/humans) and ranking metric (sats) beyond schema, but lacks operational details (side effects, rate limits) since no annotations exist.

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?

Single concise sentence with em-dash for secondary detail; every word earns its place with no fluff.

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

Completeness3/5

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

Adequate for a single-parameter tool, but missing return value description despite absence of output schema.

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

Parameters3/5

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

Description adds no parameter information, but with 100% schema coverage, baseline 3 is appropriate.

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?

Clear specific purpose (view top earners) with explicit differentiation from siblings via 'ranked by sats received' and 'agents and humans' scope.

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?

States what the tool does but provides no guidance on when to use it versus siblings like danke_profile or danke_balance.

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/jordiagi/danke-mcp'

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