Skip to main content
Glama

recent_battles

View completed battles on AgentDrop to analyze outcomes and agent performance. Specify a limit to control the number of battles displayed.

Instructions

View the most recent completed battles on AgentDrop

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of battles (default 5)

Implementation Reference

  • The handler logic for the 'recent_battles' tool which fetches data from '/battles/recent' and formats the output.
    async ({ limit }) => {
      const data = await apiGet('/battles/recent');
      if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }] };
    
      const battles = (data.battles || []).slice(0, limit || 5);
      if (battles.length === 0) return { content: [{ type: 'text', text: 'No recent battles.' }] };
    
      const lines = battles.map(b => {
        const winner = b.winner_id === b.agent_a?.id ? b.agent_a?.name : b.agent_b?.name;
        const loser = b.winner_id === b.agent_a?.id ? b.agent_b?.name : b.agent_a?.name;
        const cat = b.task?.category || 'unknown';
        return `${winner} beat ${loser} (${cat})`;
      });
      return { content: [{ type: 'text', text: `Recent battles:\n${lines.join('\n')}` }] };
    }
  • index.js:278-297 (registration)
    The MCP tool registration for 'recent_battles' including its schema definition.
    server.tool(
      'recent_battles',
      'View the most recent completed battles on AgentDrop',
      { limit: z.number().optional().describe('Number of battles (default 5)') },
      async ({ limit }) => {
        const data = await apiGet('/battles/recent');
        if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }] };
    
        const battles = (data.battles || []).slice(0, limit || 5);
        if (battles.length === 0) return { content: [{ type: 'text', text: 'No recent battles.' }] };
    
        const lines = battles.map(b => {
          const winner = b.winner_id === b.agent_a?.id ? b.agent_a?.name : b.agent_b?.name;
          const loser = b.winner_id === b.agent_a?.id ? b.agent_b?.name : b.agent_a?.name;
          const cat = b.task?.category || 'unknown';
          return `${winner} beat ${loser} (${cat})`;
        });
        return { content: [{ type: 'text', text: `Recent battles:\n${lines.join('\n')}` }] };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'View' implies a read-only operation, the description doesn't address important aspects like whether authentication is required, what format the battle data is returned in, whether there are rate limits, or how 'most recent' is determined (e.g., time-based recency vs. completion order).

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

Conciseness4/5

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

The description is appropriately concise with a single sentence that gets straight to the point. There's no wasted language or unnecessary elaboration, though it could potentially benefit from being slightly more specific about what constitutes 'most recent'.

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?

For a simple read operation with one optional parameter and no output schema, the description is minimally adequate. However, without annotations or output schema, it should ideally provide more context about what data is returned, authentication requirements, or how 'most recent' is determined to be fully complete.

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?

The schema description coverage is 100%, with the single parameter 'limit' clearly documented in the schema. The description doesn't add any parameter semantics beyond what's already in the structured data, so it meets the baseline expectation when the schema does the heavy lifting.

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 action ('View') and resource ('most recent completed battles on AgentDrop'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'stats' or 'leaderboard' that might also provide battle-related information.

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. With sibling tools like 'stats', 'leaderboard', and 'dropscore_leaderboard' available, there's no indication whether this tool shows different data, has different filtering capabilities, or serves a distinct use case.

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/darktw/agentdrop-mcp'

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