Skip to main content
Glama

bridge_dispatch_task

Dispatch coding tasks or conversational follow-ups to a target AI agent harness, with optional worktree isolation and session resumption.

Instructions

Dispatch a coding task or conversational turn to a target AI agent harness (e.g. 'claude' or 'agy'). Use this tool to delegate dev work (feature implementation, bug fixes, refactoring), code and security reviews, or technical exploration and architectural prototyping to another agent.

Args: harness: Target harness name ('claude', 'agy', or 'antigravity'). prompt: Task instructions or follow-up prompt. session_id: Optional existing session ID for conversational resumption. workspace_mode: Workspace isolation mode. Defaults to 'inherit' (executes directly in the same repository and directory). Set to 'worktree' when delegating risky refactors, speculative implementations, parallel experiments, or tasks requiring an isolated branch diff review before applying. When using 'worktree', always review the resulting diff, apply it via bridge_apply_diff if approved, and clean up the temporary worktree when done using bridge_close_session(session_id, cleanup_worktree=True). timeout_seconds: Execution timeout in seconds (default: 300). repo_root: Path to target git repository (defaults to current directory). detach: If True, dispatches the task asynchronously in the background and returns the session_id immediately to prevent client timeouts on long turns. Poll or retrieve output via bridge_get_session.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "harness": "<harness>",
      "prompt": "<prompt>"
    },
    "name": "bridge_dispatch_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
detachNo
promptYes
harnessYes
repo_rootNo
session_idNo
workspace_modeNoinherit
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, but the description adds real behavior beyond them: the 300s default timeout, the detach flag that returns a session_id immediately to avoid client timeouts on long turns, and the worktree lifecycle obligation to review and clean up. It does not say what happens when timeout_seconds elapses (error vs. partial output) or how session_id resumption merges context, which keeps it short of a 5.

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?

A front-loaded purpose sentence followed by a structured Args block is easy to scan and every entry carries operative information. A few phrases ('technical exploration and architectural prototyping') are redundant with the surrounding list, so it is efficient but not maximally tight.

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

Completeness5/5

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

An output schema exists, so return values need not be described, and the description covers the genuinely non-obvious parts of this open-world, non-idempotent delegation tool: async dispatch and polling, workspace isolation tradeoffs, and cleanup responsibilities. Nothing material for a correct first invocation is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the full burden, and it does: every one of the seven parameters is explained, including concrete harness names ('claude', 'agy', 'antigravity'), the meaning of session_id resumption, the two workspace_mode values with decision criteria, the timeout default, the repo_root default, and the async semantics of detach. This adds meaning well beyond the bare typed properties and their defaults.

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?

States a specific verb and resource ('Dispatch a coding task or conversational turn to a target AI agent harness') and enumerates the task classes it covers (dev work, reviews, exploration). It is plainly distinguishable from siblings like bridge_get_session and bridge_apply_diff, which are referenced as downstream steps rather than alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit use contexts are given for the tool as a whole and, more usefully, for the consequential workspace_mode decision: 'inherit' for normal work, 'worktree' when delegating risky refactors, speculative implementations, parallel experiments, or tasks needing isolated branch diff review. It also routes the agent to bridge_apply_diff for applying diffs and bridge_close_session(cleanup_worktree=True) for cleanup, so the multi-step workflow is spelled out rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.