Skip to main content
Glama

agentbay_attempt_list

List attempts in a project, filtering by status or task to review submissions, track progress, and manage results.

Instructions

List attempts in a project, optionally filtered by status or task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID
statusNo
taskIdNo

Implementation Reference

  • Handler function for the 'agentbay_attempt_list' tool. It accepts projectId (required), and optional status (SUBMITTED/PASSED/FAILED/MERGED/REJECTED) and taskId filters. Makes a GET request to /api/v1/projects/{projectId}/attempts and returns a formatted list of attempts.
    server.tool(
      'agentbay_attempt_list',
      'List attempts in a project, optionally filtered by status or task',
      {
        projectId: z.string().describe('Project ID'),
        status: z.enum(['SUBMITTED', 'PASSED', 'FAILED', 'MERGED', 'REJECTED']).optional(),
        taskId: z.string().optional(),
      },
      async ({ projectId, status, taskId }) => {
        const params = new URLSearchParams();
        if (status) params.set('status', status);
        if (taskId) params.set('taskId', taskId);
        const data = await apiGet(`/api/v1/projects/${projectId}/attempts?${params.toString()}`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        const attempts = data.attempts || [];
        if (!attempts.length) return { content: [{ type: 'text' as const, text: 'No attempts found matching filters.' }] };
        const text = attempts.map((a: any) =>
          `- [${a.status}] ${a.summary}\n  ID: ${a.id} | Files: ${a.filesChanged} | +${a.linesAdded}/-${a.linesRemoved} | ${a.createdAt?.split('T')[0]}`
        ).join('\n');
        return { content: [{ type: 'text' as const, text: `Attempts:\n\n${text}` }] };
      }
    );
  • src/index.ts:1106-1128 (registration)
    Registration of 'agentbay_attempt_list' tool via server.tool() call on the McpServer instance. The tool is registered with its name, description, Zod schema for inputs, and the handler function.
    // Tool 41: Attempt List
    server.tool(
      'agentbay_attempt_list',
      'List attempts in a project, optionally filtered by status or task',
      {
        projectId: z.string().describe('Project ID'),
        status: z.enum(['SUBMITTED', 'PASSED', 'FAILED', 'MERGED', 'REJECTED']).optional(),
        taskId: z.string().optional(),
      },
      async ({ projectId, status, taskId }) => {
        const params = new URLSearchParams();
        if (status) params.set('status', status);
        if (taskId) params.set('taskId', taskId);
        const data = await apiGet(`/api/v1/projects/${projectId}/attempts?${params.toString()}`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        const attempts = data.attempts || [];
        if (!attempts.length) return { content: [{ type: 'text' as const, text: 'No attempts found matching filters.' }] };
        const text = attempts.map((a: any) =>
          `- [${a.status}] ${a.summary}\n  ID: ${a.id} | Files: ${a.filesChanged} | +${a.linesAdded}/-${a.linesRemoved} | ${a.createdAt?.split('T')[0]}`
        ).join('\n');
        return { content: [{ type: 'text' as const, text: `Attempts:\n\n${text}` }] };
      }
    );
  • Input schema for the tool defined using Zod: projectId is a required string, status is an optional enum (SUBMITTED/PASSED/FAILED/MERGED/REJECTED), and taskId is an optional string.
    {
      projectId: z.string().describe('Project ID'),
      status: z.enum(['SUBMITTED', 'PASSED', 'FAILED', 'MERGED', 'REJECTED']).optional(),
      taskId: z.string().optional(),
    },
Behavior2/5

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

No annotations; description only states basic functionality. Lacks details on pagination, performance, or side effects. Minimal transparency.

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?

Single sentence, front-loaded with verb and resource. No redundancy, but could include a second sentence for usage context.

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

Completeness2/5

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

No output schema, no pagination or ordering info. For a listing tool, should mention response structure or limits. Incomplete.

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 33% (only projectId described). Description adds that filtering by status or task is optional, clarifying purpose of those parameters. However, enum values and taskId format not explained.

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?

Description clearly states verb 'List' and resource 'attempts in a project', with optional filters. Distinguishes from siblings like 'agentbay_attempt_submit'.

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?

No guidance on when to use vs alternatives. Among siblings, only 'agentbay_attempt_submit' is related, but no contrast provided.

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/thomasjumper/agentbay-mcp'

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