ASD '26
All Chapters

APPENDIX B

CLI & MCP Tool Specification

All 30 sd_* tools, the client wiring rules, the protocol facts, and the resource surface that sits behind them

Reading time

13 min

CORE PRINCIPLE: The CLI parser is generated from the same JSON schemas that the MCP server advertises over tools/list. That is why the terminal surface and the stdio surface stay aligned instead of drifting into two separate products.

CLI Command Families

The canonical terminal form is short and boring. Good. I want a runtime surface that can be scripted without ceremony: asd <tool-name> [--flag value], with the short name derived from the engine tool by stripping sd_ and replacing underscores with hyphens. The pack-local install path is fixed, Node 20 or newer is required, and the launcher never falls back to a global executable or a sibling checkout. That last point matters in release verification because the bundle is supposed to prove it can stand on its own.

install-cli-pack.sh
node platform/compiler/emit-packs.mjs --output /tmp/asd-packs
PACK=/tmp/asd-packs/cli
mkdir -p "$HOME/.local/bin"
ln -sf "$PACK/asd" "$HOME/.local/bin/asd"
export PATH="$HOME/.local/bin:$PATH"
asd --version
asd help

Flags map one-to-one onto tool arguments. Strings stay strings. Numbers, booleans, arrays, and objects are validated before the tool runs. Arrays and objects travel as JSON literals on the command line. Unknown flags, missing required flags, positional arguments, and invalid enum values exit 1 with a real error instead of a fuzzy best effort.

Family CLI command Engine alias Flags What it does
Projectasd project-listsd_project_list—List every project in the workspace.
Projectasd project-createsd_project_create--name --client --sector --service [--phase]Create project.json plus evidence/, artifacts/, renders/, and sops/.
Projectasd project-opensd_project_open--projectIdOpen one project and return metadata plus artifacts.
Projectasd project-status-setsd_project_status_set--projectId --status [--statusNote]Set the engagement lifecycle status — the Kanban column — independently of the design phase. status is an enum: briefed, active, gated, blocked, archived.
Evidenceasd evidence-addsd_evidence_add--projectId --source --kind --bodyAdd one quote, telemetry, or document record.
Evidenceasd evidence-importsd_evidence_import--projectId --path --source [--encoding] [--maxBytes] [--onError]Import transcript, CSV, or JSON evidence from inside ASD_WORKSPACE.
Evidenceasd evidence-querysd_evidence_query--projectId [--search] [--kind]Search the project evidence register.
Artifactsasd artifact-listsd_artifact_list--projectId [--kind]List a project’s typed artifacts.
Artifactsasd artifact-getsd_artifact_get--projectId --artifactIdFetch one artifact in full, including nodes, evidence refs, and review state.
Artifactsasd artifact-writesd_artifact_write--projectId --methodId --title --nodes [--edges] [--references] [--artifactId]Write a method-produced artifact through the acceptance gate.
Methodsasd method-listsd_method_list[--phase] [--producesKind]List methods from the registry.
Methodsasd method-runsd_method_run--methodId --projectIdReturn the method contract, steps, inputs, and acceptance rules.
Reviewasd reviewsd_review--projectId --artifactId --verdict --rowsRecord a Critic pass or veto with evidence-cited review rows.
Reviewasd review-listsd_review_list--projectId [--status]Show the review board across draft and final artifacts.
Exportasd export-reportsd_export_report--projectId --kind [--generatedAt]Render a deterministic HTML report.
Exportasd export-artifactsd_export_artifact--projectId --artifactId [--width]Render one artifact to deterministic SVG.
Knowledgeasd knowledgesd_knowledge[--query] [--phase] [--source] [--resourceQuery] [--resource] [--type]Query methods, kinds, and optional corpus resources.
Factcheckasd factchecksd_factcheck--projectIdReplay integrity, acceptance, and review gates. Exit 1 on pass: false.
Templates/schemaasd template-listsd_template_list—List the seven authored templates.
Templates/schemaasd template-getsd_template_get--idReturn one authored template and its body.
Templates/schemaasd schema-getsd_schema_get--kindReturn one registered artifact schema.
Templates/schemaasd practice-getsd_practice_get—Return the machine-readable practice contract.
Canvasasd canvas-addsd_canvas_add--projectId --label --url [--tool]Link an external design canvas.
Canvasasd canvas-listsd_canvas_list--projectIdList linked canvases.
Canvasasd canvas-removesd_canvas_remove--projectId --canvasIdRemove one canvas link without deleting the external file.
Orchestrationasd orchestration-plansd_orchestration_plan--projectId --idempotencyKey --title --stepsPersist a host-independent plan.
Orchestrationasd orchestration-statussd_orchestration_status--projectId [--planId]Read plans, dispatches, and handoffs.
Orchestrationasd orchestration-dispatchsd_orchestration_dispatch--projectId --planId --stepId --idempotencyKey --capability [--outcome] [--error] [--retryable] [--retryOf]Persist one dispatch attempt.
Orchestrationasd orchestration-handoffsd_orchestration_handoff--projectId --planId --idempotencyKey --from --to --condition [--artifactId] [--artifactKind]Persist a role-to-role handoff with an optional typed artifact pointer.
Phaseasd phase-advancesd_phase_advance--projectId --toPhase --idempotencyKey --approvalReceiptRecord a human-approved phase transition.

Outside the 30 engine tools, the CLI also exposes asd help and asd --version. Everything else is the registry. That separation keeps the book simple: if a command begins with a practice verb such as project-create, method-run, or phase-advance, it is really the schema-backed tool under the hood.

Two CLI behaviors are worth memorizing because they surprise people coming from softer tools. First, booleans can be bare flags or explicit true/false, but arrays and objects must be valid JSON literals. Second, exit code 1 is overloaded on purpose: it means either a real usage or runtime error, or a completed gate returning a failing verdict such as sd_factcheck with \"pass\": false. That makes CI wiring simple. A green-looking report with a failing top-level gate cannot quietly slip through as success.

MCP Tools by Family

The MCP surface exposes the same 30 tools over newline-delimited JSON-RPC 2.0 on stdio. The naming stays explicit: sd_project_create, sd_method_run, sd_review, and so on. Hosts commonly prefix those names again when they mount the bundle, which is why a Claude Code transcript may show mcp__asd__sd_method_run even though the underlying tool remains sd_method_run.

What matters operationally is the family semantics. Project tools work on the workspace tree. Evidence tools allow only three evidence kinds: quote, telemetry, and document. Artifact writes always persist honestly: acceptance success still lands as draft when Critic review is outstanding, acceptance failure persists a draft with machine-readable failures, and a dangling evidence reference is rejected before any write. Review and phase tools are the governance spine, and they keep human authority separate from automated checks.

Family MCP tools Key arguments Boundary worth remembering
Projectsd_project_list, sd_project_create, sd_project_openname, client, sector, service, optional phase; or projectId for openProjects are files on disk. There is no hidden database.
Projectsd_project_status_setprojectId; status enum briefed, active, gated, blocked, archived; optional statusNoteLifecycle status is the Kanban column, independent of design phase. Legal transitions run briefed → active → gated → blocked → archived; archived is reachable from any state and blocked ↔ active moves both ways. A same-status call is a no-op unless a note accompanies it. An unknown projectId fails, an illegal transition is rejected naming the legal targets, and a non-enum status exits 1.
Evidencesd_evidence_add, sd_evidence_import, sd_evidence_querykind is closed to quote, telemetry, document; import adds path, encoding, maxBytes, onErrorImport never fetches URLs. It reads only workspace-local files and fails closed on invalid roots and malformed inputs.
Artifactssd_artifact_list, sd_artifact_get, sd_artifact_writeWrite requires projectId, methodId, title, nodes; optional edges, references, artifactIdA failed acceptance check is not a crash. It is a persisted draft with failure rows.
Methodssd_method_list, sd_method_runList can filter by phase or producesKind; run requires methodId and projectIdsd_method_run returns the contract. It does not do the work for you.
Reviewsd_review, sd_review_listverdict is pass or veto; rows carry rowKind, severity, message, optional rule, fix, evidenceIdA veto needs at least one defect with a fix. A pass needs at least one evidence-cited row and cannot contain defects.
Exportsd_export_report, sd_export_artifactReports require kind; artifact export optionally takes widthBoth outputs are deterministic derived files under renders/.
Knowledgesd_knowledgequery, phase, source, resourceQuery, resource, typeThis tool can search the registry and the bundled corpus in one call.
Factchecksd_factcheckprojectIdIt replays integrity, acceptance, and review. Exit 1 on failure is a feature, not an exception.
Templates/schemasd_template_list, sd_template_get, sd_schema_get, sd_practice_getid for template lookup, kind for schema lookup, no arguments for practice contractThe seven authored templates do not imply one template per catalog row.
Canvassd_canvas_add, sd_canvas_list, sd_canvas_removelabel, url, optional tool where the enum is figma, penpot, paper, pencil, otherCanvas links are project records. They do not replace typed artifact writes.
Orchestrationsd_orchestration_plan, sd_orchestration_status, sd_orchestration_dispatch, sd_orchestration_handoffPlan requires idempotencyKey, title, steps[{id, role, instruction, maxRetries?}]; dispatch adds stepId, capability, optional outcome, error, retryable, retryOf; handoff uses from, to, condition, optional artifactId, artifactKindrecord-only is the generic supported dispatch capability. host-agent-spawn remains an explicit unsupported path unless a host adapter really implements it.
Phasesd_phase_advancetoPhase, idempotencyKey, approvalReceipt{receiptId, approvedBy, decision, rationale, approvedAt}The only legal receipt decision for advance is approve, and the human receipt never gets inferred from a passing artifact.
My take: The orchestration family is deliberately humble. It records plans, dispatch attempts, retries, and handoffs. It does not pretend that writing a plan means the host actually launched an agent. That boundary keeps operational evidence clean.

Resources and Prompts

The MCP surface serves the corpus as resources and the role library as prompts. When the corpus roots are present, resources/list returns 228 resources total. The page size is 100, so a client that wants the full inventory must keep paginating by cursor until the list is exhausted. The URI space is intentionally small:

URI pattern What it serves
asd://books/<book>One book overview resource from the 20-book corpus.
asd://books/<book>/<chapter>One chapter resource from the book corpus.
asd://articles/<NN>One article resource from the method and case-study series.

resources/read returns exact UTF-8 payload, MIME type, version, size, and logical provenance, never an absolute filesystem path. If the runtime is copied without its corpus roots, the list can legitimately come back empty while the 30 runtime tools still work. That is a visible boundary, not a silent fallback.

Prompt name Role
orchestratorCoordinates plans, handoffs, and human gates.
researcherCaptures evidence and structures discovery work.
synthesizerClusters, interprets, and sharpens evidence into insight.
mapperBuilds journeys, ecosystems, mental models, and blueprints.
ideatorGenerates and filters service concepts.
prototyperDesigns trials, walkthroughs, and prototype learning loops.
measurerDefines audit, measurement, maturity, and KPI logic.
criticRuns the evidence-cited review gate.
presenterPackages the work for human consumption without changing its facts.
librarianMaintains the catalog and curates knowledge growth.

prompts/get returns the shared role contract followed by the role-specific instruction set as one user message. If ASD_AGENTS_ROOT is unavailable, the prompt list is empty by design. Again: explicit boundary, no fake fallback.

Client Configurations

The pack-local rule is simple: the emitted bundle’s launcher path is relative to the pack itself. When a client runs directly from the installed pack, the relative entrypoint is correct. When a client copies the snippet elsewhere, replace the relative path with an absolute path. The server launcher does not search PATH for a spare binary.

asd-mcp.json
{
  "mcpServers": {
    "asd": {
      "command": "node",
      "args": ["mcp/bin/server.mjs"]
    }
  }
}

Claude Code uses the plugin-root variant:

.mcp.json
{
  "mcpServers": {
    "asd": {
      "command": "node",
      "args": ["${CLAUDE_PLUGIN_ROOT}/mcp/bin/server.mjs"]
    }
  }
}

OpenCode uses the command-array form:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "asd": {
      "type": "local",
      "command": ["node", "mcp/bin/server.mjs"]
    }
  }
}

Codex supports either the registration command or a TOML block:

codex-mcp-add.sh
codex mcp add asd -- node "$PWD/platform/packs/codex/mcp/bin/server.mjs"
codex.toml
[mcp_servers.asd]
command = "node"
args = ["mcp/bin/server.mjs"]

Those four snippets are enough to capture the pack-local rule and the three host-specific variants readers keep asking about. The operational nuance is that each host chooses its own working directory, which is why the relative bundle path is a rule of the installed pack, not a universal truth of the client machine.

Protocol and Error Codes

The stdio server speaks newline-delimited JSON-RPC 2.0 with MCP revision 2025-06-18. The lifecycle starts with one initialize call before tools/list, tools/call, resources/list, resources/read, prompts/list, or prompts/get. The response advertises tools, resources, and prompts, and identifies the server as asd-mcp version 0.1.0. Tool failures return MCP content blocks with isError: true; protocol framing remains valid.

initialize.json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}

Default tool timeout is 30 seconds. The frame limit is 1 MiB. Cancellation uses $/cancelRequest. Notifications remain silent. None of that is exotic, but it is precisely the kind of detail that matters when a client blames the server for behavior that actually belongs to the transport contract.

Code Meaning
-32700Parse error. The incoming JSON frame is invalid.
-32601Method not found.
-32602Invalid params, unknown tool or prompt, bad cursor, or non-object arguments.
-32603Unexpected internal handler failure.
-32000Initialize required before the client can use the surface.
-32001Tool call timed out.
-32002Resource not found.

One more boundary belongs here because it is easy to overclaim: ACP on the MCP surface is asd-acp/1 with capability record-only. The runtime can record orchestration plans, dispatch attempts, handoffs, and human gates. It does not prove that the host launched a new process. host-agent-spawn therefore remains an explicit unsupported path on the generic surface unless a host adapter really wires it up.

Environment and Workspace

ASD_WORKSPACE sets the root directory for projects. If I do nothing, the runtime uses ~/.asd/projects. That default is fine for live use. It is a bad idea for tests, demos, and disposable verification, which is why the docs push isolated temporary roots. The project tree itself is plain: project.json, evidence/index.json, artifact JSON files, exported renders, and sops/. Files are the record of truth.

workspace-isolation.sh
export ASD_WORKSPACE="$(mktemp -d)/projects"
mkdir -p "$ASD_WORKSPACE"
asd project-create --name "Metrovale Access" --client "Fictional composite" \
  --sector public-transport --service "step-free journeys" --phase discover

The MCP server adds three corpus-root environment variables beside the workspace root: ASD_BOOKS_ROOT, ASD_ARTICLES_ROOT, and ASD_AGENTS_ROOT. They control the served books, articles, and role prompts independently. That means a client can still use the 30 runtime tools even when the book corpus or prompt roots are unavailable.

Variable Default or typical value What it controls
ASD_WORKSPACE~/.asd/projectsProject file root for CLI and MCP runtime operations.
ASD_BOOKS_ROOTpack or checkout pathBook corpus resources under asd://books/<book>.
ASD_ARTICLES_ROOTpack or checkout pathArticle corpus resources under asd://articles/<NN>.
ASD_AGENTS_ROOTpack or checkout pathRole prompt files exposed through prompts/list and prompts/get.
CAUTION: Release evidence today covers six disposable stdio bundles only: buzz, claude-code, codex, kimi, mcp, and opencode. Each receipt proves initialize, 30 tools, 228 paginated resources, 10 prompts, and a representative project-to-review workflow from an isolated environment. It does not prove that every listed host has executed the pack in its native UI.

The disposable verification pattern is stronger than it looks. Each verified bundle is run from an isolated HOME, PATH, current working directory, and workspace, then forced through a representative sequence: initialize, inspect the 30 tools, page through the 228 resources, load the 10 prompts, create a project, capture evidence, write an artifact, record an evidence-cited review, and replay factcheck. That is the right level of proof for a transport bundle. It shows pack-local interoperability without pretending that every host UI or every orchestration surface has already been exercised live.

That last sentence is the right place to stop. The CLI and MCP surfaces are fully specified, but they still obey the book’s broader honesty rule: prove what ran, say what the receipt covers, and do not promote an emitted pack into host-execution evidence unless the host actually exercised it.

Next Appendix

The 20-Book Canonical Cross-Reference

The knowledge corpus behind the methods, served to hosts as book resources under asd://books/<book>

Continue Reading
ASD '26

The Agentic Service Designer

How AI Agent Teams, Service Blueprints-as-Code, and Autonomous Tooling Are Transforming Service Design from Insight to Operations. By Sam Mozaffari.

Front Matter

Front Matter

Front Matter

Copyright & License

Chapter 01

The AI-First Service Design Operating System

Chapter 02

The ASD Platform Architecture

Chapter 03

Service-Dominant Logic & Value Co-Creation in the Age of AI

Chapter 04

The Role Contract, Evidence Registers & Deterministic Fact-Checking

Chapter 05

Research Ops at Scale: Mining Transcripts & Field Inquiries

Chapter 06

Mixed Methods & Evidence-Backed Segmentation

Chapter 07

Mental Models, Alignment & Opportunity Mapping

Chapter 08

Ecosystem Value Mapping & Stakeholder Topologies

Chapter 09

Living Journey Maps: From Transcripts to Sentiment Curves

Chapter 10

The Master Blueprint: Five-Lane Architecture & Line of Visibility

Chapter 11

Agentic Service Blueprinting: The Sixth Lane & Autonomous Workflows

Chapter 12

Cross-Channel Orchestration & Story Mapping

Chapter 13

Structured Ideation & How Might We at Machine Speed

Chapter 14

Prototyping Services: Desktop Walkthroughs to Wizard-of-Oz

Chapter 15

Transformative Services, Behavior Change & Recovery Engineering

Chapter 16

Service Quality Management & CX Maturity Governance

Chapter 17

The ASD MCP Server

Chapter 18

Plugins & Host Packs: Claude Code and Beyond

Chapter 19

BUZZ: Multi-Agent Service Design on the Open Agent Network

Chapter 20

DeepSeek Harness Studio: The Integrated Workbench

Chapter 21

SOPs-as-Code: The AI Execution Playbook

Chapter 22

Frontline Enablement & Employee Experience

Chapter 23

The 15 Principles of Good Public Services

Chapter 24

Mastercase: Meridian Bay Ferries

Chapter 25

The Future of Service Design: The Agentic Practice

Appendix A

The ASD Method & Artifact Catalog

Appendix B

CLI & MCP Tool Specification

Appendix C

The 20-Book Canonical Cross-Reference

©2026 Sam Mozaffari. Free for personal/noncommercial use (CC BY-NC-ND 4.0); commercial license required for business use.