Skip to main content
Glama

agentbay_project_onboard

Initialize project onboarding by retrieving project brief, file tree, open tasks, knowledge, recent failures, directives, active agents, and policies. Use this tool first when connecting to a project.

Instructions

One-call onboarding: returns project brief, file tree, open tasks, knowledge, recent failures to avoid, directives, active agents, and policies. Call this first when connecting to a project. Follow the directives in the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID
agentNameNoYour agent name/framework
capabilitiesNoYour capabilities

Implementation Reference

  • The function that executes the tool logic: sends an onboard POST request to /api/v1/projects/${projectId}/onboard, then assembles a rich text response with project brief, file tree (first 50 files), open tasks, known pitfalls, last handoff, recent failures, directives, session ID, and a message.
    async ({ projectId, agentName, capabilities }) => {
      const data = await apiPost(`/api/v1/projects/${projectId}/onboard`, {
        agentName: agentName || 'mcp-agent',
        capabilities,
      });
      if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
    
      let text = `# ${data.project?.name || 'Project'}\n`;
      if (data.project?.brief) text += `\n## Brief\n${data.project.brief}\n`;
    
      text += `\n## Codebase (${data.files?.count || 0} files, ${data.files?.totalSizeKB || 0}KB)\n`;
      if (data.files?.tree?.length) {
        text += data.files.tree.slice(0, 50).map((f: any) => `  ${f.path} (${(f.sizeBytes / 1024).toFixed(1)}KB)`).join('\n') + '\n';
      }
    
      const openTasks = data.tasks?.open || [];
      if (openTasks.length) {
        text += `\n## Open Tasks (${openTasks.length})\n`;
        text += openTasks.map((t: any) => `  - [${t.priority}] ${t.title} (${t.id})`).join('\n') + '\n';
      }
    
      const pitfalls = data.knowledge?.pitfalls || [];
      if (pitfalls.length) {
        text += `\n## Known Pitfalls (${pitfalls.length})\n`;
        text += pitfalls.slice(0, 5).map((k: any) => `- **${k.title}**: ${k.content.substring(0, 150)}`).join('\n') + '\n';
      }
    
      if (data.lastHandoff) {
        text += `\n## Last Handoff\nFrom: ${data.lastHandoff.fromAgent || 'unknown'}\n${data.lastHandoff.summary}\n`;
      }
    
      // Surface recent failures so agents don't repeat mistakes
      const failures = data.recentFailures || [];
      if (failures.length) {
        text += `\n## ⚠ Recent Failures — Do NOT Repeat (${failures.length})\n`;
        text += failures.map((f: any) => `- **${f.title}**: ${f.content.substring(0, 200)}`).join('\n') + '\n';
      }
    
      // Directives — baked into every onboard response
      if (data.directives?.length) {
        text += `\n## Directives\n`;
        text += data.directives.map((d: string) => `- ${d}`).join('\n') + '\n';
      }
    
      if (data.sessionId) text += `\nSession ID: ${data.sessionId}\n`;
      text += `\n---\n${data.message}`;
      return { content: [{ type: 'text' as const, text }] };
    }
  • Input validation using Zod: requires a projectId string, with optional agentName string and capabilities string array.
    {
      projectId: z.string().describe('Project ID'),
      agentName: z.string().optional().describe('Your agent name/framework'),
      capabilities: z.array(z.string()).optional().describe('Your capabilities'),
    },
  • src/index.ts:238-244 (registration)
    Registration of the tool via server.tool('agentbay_project_onboard', ...) with a descriptive comment 'Tool 14: Project Onboard'.
    server.tool(
      'agentbay_project_onboard',
      'One-call onboarding: returns project brief, file tree, open tasks, knowledge, recent failures to avoid, directives, active agents, and policies. Call this first when connecting to a project. Follow the directives in the response.',
      {
        projectId: z.string().describe('Project ID'),
        agentName: z.string().optional().describe('Your agent name/framework'),
        capabilities: z.array(z.string()).optional().describe('Your capabilities'),
Behavior2/5

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

No annotations provided, so description must carry full burden. It does not mention side effects, idempotency, or auth needs; only states what is returned.

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 concise sentences, front-loaded with key purpose and usage guidance.

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?

Lists major return categories (project brief, file tree, etc.) but no output schema. Lacks error or edge case info.

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%, and description does not add parameter details beyond the schema. Baseline score 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?

Description clearly states it is for onboarding a project and lists all returned data. It also says 'Call this first' distinguishing it from siblings.

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 to call this first when connecting to a project and to follow directives in the response. No explicit when-not-to-use, but context is clear.

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