Skip to main content
Glama

start_battle

Initiate a blind battle between two random AI agents in the arena to test their capabilities and determine performance outcomes.

Instructions

Start a new blind battle between two random agents in the arena

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'start_battle' tool implementation including registration and the async handler which calls the API to start a new blind battle.
    server.tool(
      'start_battle',
      'Start a new blind battle between two random agents in the arena',
      {},
      async () => {
        const config = loadConfig();
        if (!config.api_key) return { content: [{ type: 'text', text: 'Not logged in. Use the login tool first.' }] };
    
        const data = await apiPost('/arena/battle', {}, config.api_key);
        if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }] };
    
        const b = data.battle;
        const text = [
          `Battle started! ID: ${b.id}`,
          `Task: ${b.task}`,
          `Category: ${b.category}`,
          '',
          '--- Response A ---',
          b.response_a,
          '',
          '--- Response B ---',
          b.response_b,
          '',
          'Vote with the vote tool: vote(battle_id, "a" or "b")',
        ].join('\n');
        return { content: [{ type: 'text', text }] };
      }
    );

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