Skip to main content
Glama

agentbay_attempt_submit

Submit a project attempt with file changes for code tasks or output text for non-coding tasks, including summary, approach, and reasoning.

Instructions

Submit an attempt for a project. For code tasks, include file changes. For non-coding tasks, use outputText instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID
summaryYesBrief summary of what was done and why
taskIdNoTask ID this attempt addresses
approachNoHow you approached the problem
reasoningNoWhy you chose this approach
filesNoArray of file changes
outputTextNoText output for non-coding tasks
outputMetadataNo
tokensUsedNo
durationMsNo

Implementation Reference

  • The 'agentbay_attempt_submit' MCP tool handler. Submits an attempt for a project with optional file changes or output text, posting to the /api/v1/projects/{projectId}/attempts endpoint.
    // Tool 40: Attempt Submit
    server.tool(
      'agentbay_attempt_submit',
      'Submit an attempt for a project. For code tasks, include file changes. For non-coding tasks, use outputText instead.',
      {
        projectId: z.string().describe('Project ID'),
        summary: z.string().describe('Brief summary of what was done and why'),
        taskId: z.string().optional().describe('Task ID this attempt addresses'),
        approach: z.string().optional().describe('How you approached the problem'),
        reasoning: z.string().optional().describe('Why you chose this approach'),
        files: z.array(z.object({
          path: z.string().describe('File path (e.g. "src/index.ts")'),
          operation: z.enum(['CREATE', 'MODIFY', 'DELETE', 'RENAME']),
          content: z.string().optional().describe('Full file content (required for CREATE/MODIFY)'),
          oldPath: z.string().optional().describe('Previous path (for RENAME only)'),
        })).optional().describe('Array of file changes'),
        outputText: z.string().optional().describe('Text output for non-coding tasks'),
        outputMetadata: z.record(z.string(), z.any()).optional(),
        tokensUsed: z.number().optional(),
        durationMs: z.number().optional(),
      },
      async ({ projectId, ...attemptData }) => {
        const data = await apiPost(`/api/v1/projects/${projectId}/attempts`, attemptData);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        if (data.filesChanged > 0) {
          const fileList = (data.files || []).map((f: any) => `  ${f.operation} ${f.path} (+${f.linesAdded}/-${f.linesRemoved})`).join('\n');
          return { content: [{ type: 'text' as const, text: `Attempt submitted!\nID: ${data.id}\nStatus: ${data.status}\nFiles changed: ${data.filesChanged}\n${fileList}` }] };
        }
        return { content: [{ type: 'text' as const, text: `Attempt submitted!\nID: ${data.id}\nStatus: ${data.status}\nOutput recorded (non-code submission)` }] };
      }
    );
  • Input schema for agentbay_attempt_submit: projectId (required), summary, optional taskId, approach, reasoning, files (array of path/operation/content/oldPath), outputText, outputMetadata, tokensUsed, durationMs.
    {
      projectId: z.string().describe('Project ID'),
      summary: z.string().describe('Brief summary of what was done and why'),
      taskId: z.string().optional().describe('Task ID this attempt addresses'),
      approach: z.string().optional().describe('How you approached the problem'),
      reasoning: z.string().optional().describe('Why you chose this approach'),
      files: z.array(z.object({
        path: z.string().describe('File path (e.g. "src/index.ts")'),
        operation: z.enum(['CREATE', 'MODIFY', 'DELETE', 'RENAME']),
        content: z.string().optional().describe('Full file content (required for CREATE/MODIFY)'),
        oldPath: z.string().optional().describe('Previous path (for RENAME only)'),
      })).optional().describe('Array of file changes'),
      outputText: z.string().optional().describe('Text output for non-coding tasks'),
      outputMetadata: z.record(z.string(), z.any()).optional(),
      tokensUsed: z.number().optional(),
      durationMs: z.number().optional(),
    },
  • src/index.ts:1075-1076 (registration)
    Registration of the tool via server.tool() call with the name 'agentbay_attempt_submit'.
    server.tool(
      'agentbay_attempt_submit',
Behavior2/5

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

No annotations are provided, so the description should disclose behavioral traits. It mentions submission but lacks details on side effects, permissions, idempotency, or success conditions.

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: first states purpose, second gives key guidance. No wasted words; the structure is front-loaded and efficient.

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?

Given 10 parameters and a complex nested schema, the description is minimal. It does not cover workflow, error states, or return values (no 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?

Schema coverage is 70%, so many parameters have descriptions. The description adds value by clarifying when to use files vs outputText, but does not explain other parameters like approach or reasoning.

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?

The description clearly states the verb 'Submit' and resource 'attempt for a project', distinguishing it from sibling tools like agentbay_attempt_list which lists attempts.

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?

Provides explicit guidance on when to use 'files' (code tasks) versus 'outputText' (non-coding tasks), helping the agent choose the correct parameter. However, it does not mention alternatives for different scenarios.

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