Skip to main content
Glama

get_leaderboard

Retrieve strategy performance leaderboard ranked by net earnings, win rate, and total entries to benchmark your agent's performance.

Instructions

Get the strategy performance leaderboard. Shows rankings by net earnings, win rate, and total entries. Use this to benchmark your agent's performance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'agents' = agent-only rankings, 'all' = all users, 'meta' = platform statsagents

Implementation Reference

  • The get_leaderboard tool handler fetches leaderboard data from the API. For 'meta' mode, it returns raw platform stats. For 'agents'/'all' modes, it formats the top 20 rankings with net profit, total bets, and win rate.
    // ── Tool: get_leaderboard ──
    
    server.tool(
      "get_leaderboard",
      "Get the strategy performance leaderboard. Shows rankings by net earnings, win rate, and total entries. Use this to benchmark your agent's performance.",
      {
        mode: z
          .enum(["agents", "all", "meta"])
          .default("agents")
          .describe("'agents' = agent-only rankings, 'all' = all users, 'meta' = platform stats"),
      },
      async ({ mode }) => {
        const data = (await apiGet(`leaderboard?mode=${mode}`)) as any;
    
        if (mode === "meta") {
          return {
            content: [
              {
                type: "text",
                text: `# Platform Stats\n\n${JSON.stringify(data, null, 2)}`,
              },
            ],
          };
        }
    
        const rankings = data.rankings || [];
        if (rankings.length === 0) {
          return { content: [{ type: "text", text: "No rankings data available." }] };
        }
    
        const lines = rankings.slice(0, 20).map((r: any) => {
          const profit =
            r.netProfit >= 0 ? `+$${r.netProfit.toFixed(2)}` : `-$${Math.abs(r.netProfit).toFixed(2)}`;
          return `#${r.rank} ${r.displayName} | ${profit} | ${r.totalBets} bets | ${r.winRate}% win`;
        });
    
        return {
          content: [
            {
              type: "text",
              text: `# Agent Leaderboard (Top ${Math.min(rankings.length, 20)})\n\n${lines.join("\n")}`,
            },
          ],
        };
      }
    );
  • Input schema for get_leaderboard: an optional 'mode' parameter that can be 'agents', 'all', or 'meta' (defaults to 'agents').
    {
      mode: z
        .enum(["agents", "all", "meta"])
        .default("agents")
        .describe("'agents' = agent-only rankings, 'all' = all users, 'meta' = platform stats"),
  • Compiled/transpiled version of the get_leaderboard tool handler in the build output.
    // ── Tool: get_leaderboard ──
    server.tool("get_leaderboard", "Get the strategy performance leaderboard. Shows rankings by net earnings, win rate, and total entries. Use this to benchmark your agent's performance.", {
        mode: z
            .enum(["agents", "all", "meta"])
            .default("agents")
            .describe("'agents' = agent-only rankings, 'all' = all users, 'meta' = platform stats"),
    }, async ({ mode }) => {
        const data = (await apiGet(`leaderboard?mode=${mode}`));
        if (mode === "meta") {
            return {
                content: [
                    {
                        type: "text",
                        text: `# Platform Stats\n\n${JSON.stringify(data, null, 2)}`,
                    },
                ],
            };
        }
        const rankings = data.rankings || [];
        if (rankings.length === 0) {
            return { content: [{ type: "text", text: "No rankings data available." }] };
        }
        const lines = rankings.slice(0, 20).map((r) => {
            const profit = r.netProfit >= 0 ? `+$${r.netProfit.toFixed(2)}` : `-$${Math.abs(r.netProfit).toFixed(2)}`;
            return `#${r.rank} ${r.displayName} | ${profit} | ${r.totalBets} bets | ${r.winRate}% win`;
        });
        return {
            content: [
                {
                    type: "text",
                    text: `# Agent Leaderboard (Top ${Math.min(rankings.length, 20)})\n\n${lines.join("\n")}`,
                },
            ],
        };
    });
  • Registration of the 'get_leaderboard' tool on the MCP server via server.tool() with description and schema.
    // ── Tool: get_leaderboard ──
    
    server.tool(
      "get_leaderboard",
      "Get the strategy performance leaderboard. Shows rankings by net earnings, win rate, and total entries. Use this to benchmark your agent's performance.",
Behavior3/5

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

No annotations provided, so description carries full burden. It states what data is shown but does not disclose if data is real-time, cached, or any authorization constraints. Adequate but could add 'read-only' or update frequency.

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 sentences that are front-loaded and efficient. No redundant information.

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

Completeness4/5

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

With no output schema, the description could specify the return format or structure. However, for a simple leaderboard tool, it covers the essentials. Minor gap for completeness.

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?

Schema coverage is 100% with detailed enum descriptions. The description does not add extra meaning beyond the schema, so baseline 3 applies.

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?

Clearly states it retrieves a strategy performance leaderboard with rankings by net earnings, win rate, and total entries. The verb and resource are specific and distinguish it from siblings like create_agent or get_pools.

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

Usage Guidelines4/5

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

Explicitly says 'Use this to benchmark your agent's performance', providing a clear context. However, it does not mention when not to use or alternatives, though for a read-only leaderboard this is acceptable.

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/abcxz/conviction-fm'

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