/dispatch:repo-toolsfrom Dispatch
Exposes a repo's own scripts as MCP tools via .dispatch/tools.json, with optional cleanup hooks on agent stop. Useful when agents repeatedly rediscover the same shell commands.
Ships in Dispatch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
.dispatch/tools.json)Every repo can publish its own MCP tools to the agents working in it. Drop a
.dispatch/tools.json at the repo root and each entry becomes a real tool in the
agent's tool list — discoverable without anyone documenting it in a prompt.
The symptom that means you want this: agents keep rediscovering the same shell incantation, or a README paragraph keeps getting ignored because nothing surfaces it at the moment of use.
{
"hooks": {
"stop": {
"command": ["./bin/dev", "down"],
"description": "Tear down the agent's isolated dev environment on stop."
}
},
"tools": [
{
"name": "dev_up",
"description": "Start the repo's isolated dev environment on free ports.",
"command": ["./bin/dev", "up"],
"scope": ["agent"],
"params": [
{
"name": "live",
"type": "boolean",
"flag": "--live",
"description": "Enable the live agent runtime instead of inert mode."
},
{
"name": "cwd",
"type": "string",
"flag": "--cwd",
"description": "Working directory override (e.g. a worktree path)."
}
]
}
]
}
| Field | Required | Notes |
|---|---|---|
name | yes | Exposed as repo_<name>. Dots are stripped — MCP names cannot contain them |
description | yes | This is what makes the tool get used. See below |
command | yes | Argv array, run from the agent's checkout root |
params | no | Turned into CLI flags appended to command |
scope | no | agent (standard agents and persona reviewers) and/or job (scheduled job runs). Omit to expose everywhere |
repo_ prefixing is automatic and keeps repo tools in their own namespace, so a
repo tool can never shadow a built-in Dispatch tool like launch_agent or
post.
Scope values Dispatch doesn't recognize are dropped from the array, and a scope
left with nothing recognizable falls back to no scope at all — so a misspelled
scope silently re-exposes a job-only tool to every agent. Older manifests
sometimes carry "reviewer"; nothing is ever loaded under that scope, so a tool
scoped to it alone is exposed to no one. Persona reviewers are covered by
agent.
Write the description for an agent that has never seen this repo. It is the only thing standing between the tool existing and the tool being used. Say what the command does and when to reach for it — not just what it is named.
Each param becomes a flag appended to command:
type: "string" → appends <flag> <value> when a non-empty value is passed.type: "boolean" → appends <flag> only when the value is true.name, type, and flag are all required; a param missing any of them fails to
load. Give every param a description too — the agent picks values from it.
Commands run from the root of the agent's checkout — the worktree root for
worktree agents, otherwise the repo root — with DISPATCH_AGENT_ID set in the
environment. There is no shell: the argv array is spawned directly, so pipes,
globs, and && need a wrapper script.
Every exit code is returned to the agent rather than throwing — stdout,
stderr, and the exit code all come back, so the agent can read a failure instead
of just seeing an error. Write scripts that fail loudly on stderr.
hooks.stop.command runs when the agent stops. Use it for teardown that would
otherwise leak: stopping a dev stack, removing a container, releasing a port.
Keep it fast and idempotent — it may run when the thing it cleans up was never
started, and it is killed after 15 seconds. A failing or timed-out hook is
logged and never blocks the stop.
The tools manifest is re-read from disk on every MCP request — there is no
caching — so an edited command, description, or param takes effect on the next
tool listing with no server restart. (The mtime cache in Dispatch applies only to
hooks, not to tools.)
The catch is on the client side: an agent's CLI fetches its tool list once at session start and holds it. So an edit to an existing tool is picked up by the server immediately, but a newly added tool usually will not be callable by an already-running agent until it reconnects or a new session starts.
A malformed entry (missing name, description, or command) throws at load,
and that error escapes the MCP request handler rather than being reported as a
parse error. The symptom is not "the repo_* tools are missing" — it is the
whole Dispatch MCP server failing for that session, built-in tools included. If
Dispatch's tools stop resolving, validate .dispatch/tools.json first.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub selfcontained/dispatch --plugin dispatch13 skills in this plugin
/brainRecord decisions, findings, or state in the repo's shared persistent store so they survive this session. Use when you need to remember something for later, look up what was already decided, or accumulate results across runs./communicatePick the shape for something you are about to tell the user — a plain or threaded reply, a question they answer in one click, a form, a file, a link, a checklist, or a data visualization. Use when you need a decision from them, have progress or a result to report, or produced something they should look at./jobsRun agent work on a schedule with structured pass/fail reporting. Use for recurring or unattended work — nightly triage, release babysitting, cleanup — or when a run's outcome must be machine-readable.Other plugins' skills for the same job