Skip to main content
Glama

bootstrap_internal_agent

Destructive

Initialize development workflows by converting triggers from GitHub, Slack, or Linear into structured context, creating recall packs, preparing sandbox environments, and generating execution plans.

Instructions

Normalize a GitHub/Slack/Linear trigger into startup context, construct a recall pack, prepare a git worktree sandbox, and emit an execution plus reviewer-lane plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
repoPathNo
prepareSandboxNo
sandboxRootNo
intentIdNo
contextNo
mcpProfileNo
partnerProfileNo
delegationModeNo
approvedNo
triggerNo
threadNo
taskNo
commentsNo
messagesNo

Implementation Reference

  • The core implementation of the bootstrapInternalAgent function, which handles context normalization, sandbox preparation, and intent planning.
    function bootstrapInternalAgent(options = {}) {
      const invocation = normalizeInvocation(options);
      const startupContext = buildStartupContext(invocation);
    
      ensureContextFs();
      const recallPack = constructContextPack({
        query: buildRecallQuery(invocation),
        maxItems: 6,
        maxChars: 5000,
      });
    
      const sandbox = invocation.prepareSandbox
        ? ensureWorktreeSandbox({
          repoPath: invocation.repoPath,
          sandboxRoot: invocation.sandboxRoot,
          threadId: invocation.threadId,
        })
        : {
          ready: false,
          kind: 'none',
          path: null,
          reused: false,
          baseRef: null,
        };
    
      const plan = planIntent({
        intentId: invocation.intentId,
        context: startupContext.text,
        mcpProfile: invocation.mcpProfile,
        partnerProfile: invocation.partnerProfile,
        delegationMode: invocation.delegationMode,
        approved: invocation.approved,
        repoPath: sandbox.path || invocation.repoPath || undefined,
      });
    
      const reviewerLane = buildReviewerLane(plan);
      const codeGraphSection = formatCodeGraphRecallSection(plan.codegraphImpact);
      const middlewarePlan = buildMiddlewarePlan({
        sandbox,
        recallPack,
        plan,
        reviewerLane,
      });
    
      const payload = {
        generatedAt: new Date().toISOString(),
        invocation: {
          source: invocation.source,
          trigger: invocation.trigger,
          thread: invocation.thread,
          threadId: invocation.threadId,
          task: invocation.task,
          repoPath: invocation.repoPath,
          prepareSandbox: invocation.prepareSandbox,
          intentId: invocation.intentId,
          mcpProfile: invocation.mcpProfile || 'default',
          delegationMode: invocation.delegationMode,
        },
        startupContext,
        recallPack: summarizePack(recallPack),
        sandbox,
        intentPlan: plan,
        reviewerLane,
        middlewarePlan,
        codeGraph: {
          enabled: Boolean(codeGraphSection),
          section: codeGraphSection,
        },
      };
    
      recordProvenance({
        type: 'internal_agent_bootstrap_created',
        source: invocation.source,
        threadId: invocation.threadId,
        sandboxPath: sandbox.path,
        intentId: plan.intent.id,
        delegationEligible: plan.delegationEligible,
        packId: recallPack.packId,
      });
    
      return payload;
    }
  • Registration of the 'bootstrap_internal_agent' tool in the tool registry.
    name: 'bootstrap_internal_agent',
    description: 'Normalize a GitHub/Slack/Linear trigger into startup context, construct a recall pack, prepare a git worktree sandbox, and emit an execution plus reviewer-lane plan.',
  • MCP server request handler route for 'bootstrap_internal_agent'.
    case 'bootstrap_internal_agent':
      return toTextResult(bootstrapInternalAgent(args));
Behavior3/5

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

The annotation provides destructiveHint=true, indicating this tool performs destructive operations. The description adds behavioral context by mentioning it 'prepares a git worktree sandbox' and 'emits an execution plus reviewer-lane plan', which suggests it sets up an environment and generates plans, but it does not elaborate on what gets destroyed, rate limits, or authentication needs. With the annotation covering the safety profile, the description adds some value but lacks rich behavioral details.

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 a single, dense sentence that efficiently lists multiple actions without unnecessary words. However, it could be more front-loaded by explicitly stating the core purpose first, as the current structure bundles all steps together, which may reduce immediate clarity despite being concise.

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 the high complexity (15 parameters, nested objects, 0% schema coverage), destructive annotation, and no output schema, the description is insufficient. It does not explain what the tool returns, how parameters interact, or the implications of the destructive operation. For a tool with such intricate inputs and behavioral risks, more comprehensive guidance is needed to ensure correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 15 parameters are documented in the schema. The description mentions 'GitHub/Slack/Linear trigger' and 'startup context', which loosely relate to parameters like 'source' and 'context', but it does not explain the purpose or relationships of key parameters such as 'repoPath', 'delegationMode', 'approved', or nested objects like 'trigger', 'thread', and 'task'. The description fails to compensate for the complete lack of schema documentation.

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 tool's purpose with specific verbs ('normalize', 'construct', 'prepare', 'emit') and resources ('GitHub/Slack/Linear trigger', 'startup context', 'recall pack', 'git worktree sandbox', 'execution plus reviewer-lane plan'). It distinguishes itself from sibling tools by focusing on bootstrapping an internal agent from external triggers, which is unique among the listed siblings that handle feedback, recall, context management, and diagnostics.

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. It does not mention prerequisites, exclusions, or specific scenarios for invocation. Given the complex input schema with 15 parameters, this lack of usage context is a significant gap, leaving the agent uncertain about appropriate application.

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/IgorGanapolsky/mcp-memory-gateway'

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