Skip to main content
Glama

start_handoff

Destructive

Initiate sequential delegation from eligible intent plans by transferring context and approvals to designated profiles for continued execution.

Instructions

Start a sequential delegation handoff from a delegation-eligible intent plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intentIdYes
contextNo
mcpProfileNo
bundleIdNo
partnerProfileNo
approvedNo
repoPathNo
delegateProfileNo
plannedChecksNo

Implementation Reference

  • The core implementation of the start_handoff logic.
    function startHandoff(params = {}) {
      const evaluation = evaluateDelegation({
        delegationMode: 'sequential',
        plan: params.plan,
        mcpProfile: params.mcpProfile,
        context: params.context,
        repoPath: params.repoPath,
        plannedChecks: params.plannedChecks,
      });
    
      if (String(params.mcpProfile || '').trim() === 'dispatch') {
        persistRejectedStart({
          taskKey: evaluation.taskKey,
          intentId: params.plan && params.plan.intent ? params.plan.intent.id : null,
          delegateProfile: null,
          mcpProfile: params.mcpProfile,
          partnerProfile: params.partnerProfile,
          reasonCode: 'dispatch_profile',
          reason: 'Dispatch MCP profile may not start handoffs.',
          context: params.context,
          repoPath: params.repoPath,
        });
        throw createDelegationError('Dispatch MCP profile may not start handoffs.', 403);
      }
    
      if (String(params.mcpProfile || '').trim() === 'locked') {
        persistRejectedStart({
          taskKey: evaluation.taskKey,
          intentId: params.plan && params.plan.intent ? params.plan.intent.id : null,
          delegateProfile: null,
          mcpProfile: params.mcpProfile,
          partnerProfile: params.partnerProfile,
          reasonCode: 'locked_profile',
          reason: 'Locked MCP profile may not start handoffs.',
          context: params.context,
          repoPath: params.repoPath,
        });
        throw createDelegationError('Locked MCP profile may not start handoffs.', 403);
      }
    
      if (!evaluation.delegationEligible || evaluation.executionMode !== 'sequential_delegate') {
        persistRejectedStart({
          taskKey: evaluation.taskKey,
          intentId: params.plan && params.plan.intent ? params.plan.intent.id : null,
          delegateProfile: evaluation.delegateProfile,
          mcpProfile: params.mcpProfile,
          partnerProfile: params.partnerProfile,
          reasonCode: evaluation.reasonCode,
          reason: evaluation.delegationReason,
          context: params.context,
          repoPath: params.repoPath,
        });
        throw createDelegationError(evaluation.delegationReason, evaluation.reasonCode === 'unresolved_handoff_exists' ? 409 : 422, {
          reasonCode: evaluation.reasonCode,
        });
      }
  • Tool registration for start_handoff.
    destructiveTool({
      name: 'start_handoff',
      description: 'Start a sequential delegation handoff from a delegation-eligible intent plan',
      inputSchema: {
        type: 'object',
        required: ['intentId'],
        properties: {
          intentId: { type: 'string' },
          context: { type: 'string' },
          mcpProfile: { type: 'string' },
          bundleId: { type: 'string' },
          partnerProfile: { type: 'string' },
          approved: { type: 'boolean' },
          repoPath: { type: 'string' },
          delegateProfile: { type: 'string' },
          plannedChecks: { type: 'array', items: { type: 'string' } },
        },
      },
  • MCP tool handler routing for start_handoff in server-stdio.js.
    case 'start_handoff':
      return toTextResult(startHandoff({
        plan: planIntent({
          intentId: args.intentId,
          context: args.context || '',
          mcpProfile: args.mcpProfile,
          bundleId: args.bundleId,
          partnerProfile: args.partnerProfile,
          delegationMode: 'sequential',
          approved: args.approved === true,
          repoPath: args.repoPath,
        }),
Behavior3/5

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

The description adds no behavioral context beyond the destructiveHint annotation (which indicates potential data changes). It doesn't explain what 'destructive' entails (e.g., what gets modified, permissions needed, or side effects), nor does it cover other traits like rate limits or response format. With annotations providing basic safety info, the description adds minimal value but no contradiction.

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, direct sentence with no wasted words, making it appropriately concise. However, it's not front-loaded with critical details (e.g., purpose differentiation or key parameters), slightly reducing its effectiveness despite the brevity.

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 tool's complexity (9 parameters, destructive operation, no output schema), the description is inadequate. It lacks essential details: what a 'handoff' entails, how parameters interact, what happens post-invocation, or how it differs from siblings. With annotations only hinting at destructiveness, the description leaves too many gaps for reliable agent use.

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?

With 0% schema description coverage and 9 parameters (only 'intentId' required), the description fails to compensate by explaining any parameters. It doesn't clarify what 'intentId', 'context', 'mcpProfile', etc., represent or how they influence the handoff, leaving the agent to guess based on parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Start[s] a sequential delegation handoff from a delegation-eligible intent plan', which provides a verb ('Start') and resource ('handoff') but is somewhat vague. It doesn't clearly distinguish this from sibling tools like 'complete_handoff', 'session_handoff', or 'plan_intent', leaving ambiguity about what specifically differentiates this tool.

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 offers minimal guidance, implying usage when there's a 'delegation-eligible intent plan' but provides no explicit when-to-use criteria, prerequisites, or alternatives. It doesn't clarify when to choose this over similar tools like 'complete_handoff' or 'session_handoff', leaving the agent with little practical direction.

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