Every tool acts on the one workspace the connection is bound to. IDs come from the replies of other tools, such as specification_id from list_specifications. A branch_id names a draft or a proposal. “You” is the caller: your account over browser sign-in, or its own agent user with an API key. Agents read each tool description from the server; this list is for people checking what an agent can do. Parameters are strings unless marked otherwise. Unknown parameters are refused before the tool runs, with an error listing the accepted parameters. Other errors can happen after part of a call has succeeded: submit_goal, for example, records artifacts before submitting, so those artifacts remain if the submission is refused. Read the error and the current goal before retrying.
Specification tools
list_areas
List the workspace areas, the domains such as auth or billing. Specs take area IDs, and a goal reads the areas of its spec. No parameters.
create_area
Create an area. Check list_areas first and keep areas coarse, a handful for the whole system.
nameRequiredShort domain name, such as billingdescriptionOne linelist_specifications
List every spec with its scope, sections, areas, depends_on and phase: drafting, ready, in_build or verified, and null for a foundational doc. A ready spec can still wait on an unbuilt prerequisite, an open question or a goal assigned to someone else. Documents from the organization Library appear too, marked shared and read-only here.
scopefeature or foundational. Omit for both.search_specifications
Ranked search of published titles and content in the workspace and the organization Library. Each hit names the spec and the matched_section_id to pass to read_section. Drafts and proposals are not indexed.
queryRequiredEvery term must match and prefixes count; organization workspaces also match by meaningscopefeature or foundational. Omit for both.limitinteger1 to 50, default 20read_specification
Read a spec with its sections, open drafts and proposals, criteria and their verification state, health, last_goal, depends_on and needed_by.
specification_idRequiredcreate_specification
Create a spec. Feature scope creates Product and Engineering sections. Foundational scope creates one section, in Markdown or as a Mermaid diagram; the System Architecture template creates the workspace architecture diagram.
titleRequiredscopeRequiredfeature or foundationaltemplatesobjectMaps product, engineering or foundational to a template ID from list_templatesareasstring[]Area IDs. Omit for workspace-wide.formatmarkdown (default) or mermaid, foundational only. A template format wins.retag_specification
Replace the areas of a spec. An empty list makes it workspace-wide.
specification_idRequiredareasstring[]RequiredThe full set of area IDsset_spec_dependencies
Set the specs a feature spec builds on, replacing the current set. Its goals cannot be claimed until each prerequisite is built: no unfinished goal, and a finished goal or every criterion verified. A cycle is refused.
specification_idRequiredA feature specdepends_onstring[]RequiredDirect prerequisites only. Empty clears.verify_existing_criteria
For a spec written from code that already exists: mark every criterion nobody has claimed or reviewed as agent verified, so the spec reads verified, plan_build skips it, and it counts as built. Never for code the agent wrote, which goes through submit_goal. Refused while a goal on the spec is in progress or in review.
specification_idRequiredread_section
Read the published content of one section and the spec version.
specification_idRequiredsection_idRequiredbranch_idA draft or proposal instead. Not with version.versionintegerThe section as it was at that spec versionResult
Use the returned content and content_hash when editing a draft. Pass the hash as expected_content_hash to update_draft.
diff_specification
Show what changed between two published versions: the versions in between and, per changed section, only the blocks that differ.
specification_idRequiredfromintegerDefault: the version the last finished goal built throughtointegerDefault: the current versioncreate_draft
Open a section in a draft of the spec; each section you open lands in the same draft. With goal_id it is the goal's draft, which submit_goal proposes: never create_proposal it. After a send-back the same call finds it again; while the goal is in review it answers goal_in_review. Without goal_id it is your own draft, for changing another document. Refused while a draft of yours from another base is open.
specification_idRequiredsection_idRequiredgoal_idThe goal whose draft this edit belongs in. On the goal's own spec, always pass it. Not with from_branch_id.from_branch_idAn open proposal to revise; create_proposal adds the draft back into itall_sectionsbooleanWith from_branch_id, open every section the proposal touchesResult
The branches entry identifies the draft. Use its ID as branch_id to read and update the section.
update_draft
Replace one section of your draft, keeping the template headings. In a Product or Engineering section, each - [ ] item at the left margin becomes a tracked AC-n criterion on publish: rewording one replaces it, removing one retires it, and the checkbox state is ignored. A fenced mermaid block renders as a diagram in the web app.
specification_idRequiredsection_idRequiredbranch_idRequiredThe draftcontentRequiredMarkdown. A diagram document takes raw Mermaid source with no fence.expected_content_hashThe hash you last read. A mismatch refuses the write instead of overwriting.Result
Keep the stored content and content_hash from the reply for further edits; the server normalizes checklist spacing.
Recovery
For stale_content, read the section again with the draft's branch_id, merge your edits with the current text, and retry with the fresh hash.
Example: edit a goal's draft
These are tool arguments, not shell commands. Replace the placeholders with IDs from tool replies. First, read_specification returns the section IDs. Open the section with create_draft:
Take the draft ID from the reply's branches entry and pass it as branch_id to read_section:
Edit the returned content, keeping the template headings and the text you are not changing. Pass the complete revised section to update_draft, with the content_hash from that read:
If the hash no longer matches, read the section again and merge the changes before retrying. Keep the returned stored text and hash for any further edits. Finish through submit_goal, which proposes this draft.
create_proposal
Submit your own draft for review, every section at once: the way to change another document.
specification_idRequiredbranch_idRequiredThe draftresolutionsobject[]One object per conflict you resolve, using the fields below. Omit on the first call.| Field | Required | Details |
|---|---|---|
section_id | Required | The conflicting section ID. |
content | Required | The complete resolved section text. |
proposal_content_hash | Required | The hash supplied with that conflict. |
Restrictions
Not for a goal's draft: use submit_goal. Calling this on one returns goal_draft_proposes_at_submit.
Result
Returns proposal_id. It joins the proposal the draft was opened from, otherwise the spec's open non-goal proposal, otherwise starts a new one. The submitted draft is no longer editable; revise the proposal with create_draft and from_branch_id.
Recovery
A conflict reply lists conflicting sections. Merge each section's text and retry with resolutions. If a proposal hash has moved, resolve the newly returned conflict with its fresh hash.
discard_proposal
Delete a proposal and its history: your own, one linked to a goal, or one SpecDeck wrote. To revise a proposal instead, create_draft with from_branch_id.
specification_idRequiredbranch_idRequiredThe proposalpublish_draft
Publish a draft or proposal as the next version of the spec, without review; the reply carries published_version. A conflicting section is refused with the conflicts listed. Use it only when the person says to skip review. A workspace can require review for agents over MCP or on an API key; publishing is then refused, and submit_goal or create_proposal is the way.
specification_idRequiredbranch_idRequiredThe draft or proposalGoal tools
Four calls carry feedback on a goal: ask_question, record_decision, submit_goal and release_goal.
list_goals
List the goals in the workspace: id, specification, title, status, assignee and timestamps per goal. read_goal returns the brief and criteria.
statusidle, in_progress, in_review or donespecification_idOnly the goals on this specification.read_goal
Read a goal: first its briefing (why earlier runs ended, open decisions, prerequisite branches not yet on the main branch, the documents that apply), then the brief, status, assignee, actions, artifacts, scoped criteria and the open submission.
goal_idRequiredcreate_goal
Create an idle, unassigned goal on a feature spec. The spec needs a published version with at least one criterion, and can hold only one goal that is not done.
specification_idRequiredA feature spectitleRequiredUnder 80 characterssummaryThe brief in Markdown: ## Scope, plus ## Setup when the work changes how the system runs or starts from a branch other than main. At most 20000 bytes.scopestring[]The AC-n handles to build, those not yet verified. Omit when none is verified, to scope every active criterion.get_next_goal
Claim the next idle goal you may take, your own first, and set it in_progress. Skips goals waiting on a person, an unbuilt prerequisite or another goal on the spec, and goals assigned to someone else. Takes over a goal whose agent has been silent for eight hours. Returns no_goals_available when nothing is claimable.
specification_idClaim the goal of that spec. Answers no_active_goal, or not_claimable with a reason: in_progress, in_review, assigned, needs_input, blocked or spec_not_ready.submit_goal
Hand implementation back for review with one claim per scoped criterion not yet verified, plus each criterion added or reworded in the goal's draft. Submission also proposes that draft.
goal_idRequiredcriteriaobject[]Claims using the fields below. Omit only when no scoped or new draft criterion needs a claim.spec_branch_idOptional explicit branch selection. Normally omit: submission finds the goal's own draft or proposal. An agent cannot submit a personal branch (not_goal_proposal).artifactsobject[]Evidence to record before submission. An existing identical artifact is not recorded twice.| Field | Required | Details |
|---|---|---|
id | One of id or item | An existing AC-n handle or criterion UUID from read_goal. Never with item. |
item | One of id or item | For a criterion added or reworded in the goal's draft: its exact new - [ ] text. Never with id. The claim lands on the new criterion when published. |
status | Required | met or unmet. See the claim meanings below. |
tests | For met: tests or evidence | An array of 1 to 50 test names or paths when supplied. |
evidence | For unmet; or instead of tests for met | How the agent verified the behavior, or what is missing and how a person can check it. |
| Field | Required | Details |
|---|---|---|
type | Required | branch, commit, pull_request, deployment, test_report or ci_run. |
value | Required | Branch name, commit SHA or URL. A pull_request takes its web URL. |
environment | For deployment only | local, dev, qa, stage or prod. Required for deployment and refused for other types. |
Claim meanings
met means the agent verified the criterion, supported by tests or evidence. unmet means the agent could not verify it: verification may be missing, or the behavior may be known to fail. Explain which in evidence. Every unmet claim needs evidence and a deployment artifact pointing at a running build the reviewer can access.
Result
The goal moves to in_review for a person to check and finish. notices flags changes to the spec or prerequisites during the build. Read the current goal to inspect its open submission. A goal with no scoped criteria is marked done directly, unless an agent submits a spec change: then a person marks it done.
| Error | What to do |
|---|---|
decisions_not_written | Write each listed decision into the goal's own draft, then resubmit. |
criteria_incomplete | Add a claim for each listed scoped criterion. |
new_items_unclaimed | Claim each new or reworded draft criterion with item instead of its old id. |
deployment_required | Add an accessible deployment artifact, then resubmit. |
not_goal_proposal | Leave out spec_branch_id. Keep edits in the goal's own draft, opened with goal_id. |
submission_open | Read the goal first. To continue editing, withdraw the submission with update_goal status in_progress. |
Before retrying
Artifacts are recorded first and remain even when submission is refused. Use read_goal to check artifacts, status and the current submission before retrying.
Example: submit claims with evidence
This example assumes read_goal lists two scoped criteria: AC-1 covers saving a renamed item, and AC-2 covers keyboard focus. Replace the goal ID, criterion handles and evidence with the actual work. These are arguments to submit_goal:
The met claim needs tests or evidence; it does not require both. The unmet claim needs evidence explaining what remains to check, plus a deployment artifact the reviewer can access. Here that reviewer runs the app on the same machine. Artifacts are recorded first, so this deployment satisfies that requirement in the same call.
For a criterion added or reworded in the goal's draft, replace the claim's id with item containing its exact new - [ ] ... text. Never pass both. Leave out spec_branch_id; submission finds the goal's draft itself.
update_goal
Change the status, assignee, title, brief or scope of a goal; reassigning hands the work off.
goal_idRequiredstatusidle, in_progress or doneassignee_idUser ID of a person or an agenttitleUnder 80 characterssummaryThe whole brief, replaced. Must keep ## Scope. At most 20000 bytes.setupReplaces only the body of ## Setup. Not with summary; no line starting with ## .reasonWith idle on your own goal: why you hand it back. At most 4000 bytes.scopestring[]Replacement AC-n handles. Frozen while in review.Restrictions
An agent cannot take an idle goal assigned to someone else or set in_review. Setting done is refused when the goal scopes criteria (verification_required), or is in review, has a draft spec change or an open decision (submit_to_finish). Use submit_goal to hand work back for review.
Result
Setting idle on your own goal hands it back. Setting idle or in_progress on a goal in review withdraws its submission; use in_progress to keep working.
release_goal
Hand a goal back: it goes idle and unassigned, and the next agent reads the reason in read_goal. To wait for an answer from a person instead, use ask_question, which keeps the goal yours.
goal_idRequiredreasonRequiredWhat is done, what is left, what stopped you. At most 4000 bytes.record_decision
Record one choice where the spec is silent or wrong that would change the spec if adopted, and why; never implementation detail or scope. Write the change into the goal's draft first: add a new item rather than append to one. A deviation is a decision too. The goal keeps running. A person adopts or rejects it next to the change, and a rejection sends the goal back with the reason.
goal_idRequireddecisionRequiredOne choice and why, in a sentence or twoask_question
Ask a person and wait: the only call that stops the goal. Use it for how the spec should read, a contradiction between documents, or a change the rest of the work waits on (written into the goal's draft first). The goal goes idle and stays yours. The agent is not notified of the answer: tell it to continue, and its next get_next_goal resumes the goal.
goal_idRequiredcontentRequiredThe questionproposed_optionsstring[]2 to 5 answers a person picks with one click, each at most 200 bytesadd_artifact
Record evidence on a goal. Add the git branch when you create it and the pull request URL when you open it, so a git host integration can match the pull request and show when it lands. A landed pull request never changes the goal status.
goal_idRequiredtypeRequiredbranch, commit, pull_request, deployment, test_report or ci_runvalueRequiredBranch name, commit SHA or URL; for pull_request, its web URLenvironmentlocal, dev, qa, stage or prod. Required for deployment, refused for other types.update_artifact
Change the value or environment of an artifact. The type is fixed.
goal_idRequiredartifact_idRequiredvalueenvironmentlocal, dev, qa, stage or prodTemplate tools
list_templates
List the section templates for create_specification. A template kind must match the section it fills.
kindproduct, engineering or foundationalWorkflow tools
Each returns the steps of the prompt of the same name for the agent to follow, and changes nothing itself. A value outside the ones listed is refused; a missing one takes the default.
onboard_codebase
Return the steps that turn the code in the working directory into specs. See Onboard an existing codebase.
modeplan (default) or autonomousoutputpropose (default) or publishplan_build
Return the steps that plan the build of every spec that is ready, rendered from the workspace. No parameters.
install_agents_md
Return the steps that install or refresh the Working with SpecDeck section. They show the change and wait for a yes before writing.
fileRelative to the repository root. Default: AGENTS.md