> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-mcp/workflow-recipes/edit-validate-and-publish-deliberately.md).

# Edit, validate and publish deliberately

Change a workflow in its draft, review the saved result, and publish it when you are ready for future runs to use it.

## Before you start

You need edit access to the project and publication access if you will release the change. Confirm the organization and resolve any required provider connections first.

## Edit and review the draft

1. Read the complete current draft with `projects_get(version="draft")`.
2. For integrations, discover provider/action schemas through `catalog_list` and an authorized account through `connections_list`.
3. Use `projects_edit` with `publish=false`. Choose a natural-language description for a broader change, or a direct patch for an exact edit. Do not send both.
4. For a direct patch, first use `dry_run=true`. Review the projected delta and any suggested fixes, then submit with `dry_run=false` to save.
5. Inspect corrections and unresolved connections, then call `projects_validate`. Fix errors and review warnings.
6. Once publication is intended, submit the reviewed edit with `publish=true`. A publication-only structured call can use `direct_patch: []`; verify the resulting `published` and `publish_error` fields.
7. Read the published version again before running it.

Natural-language draft edit:

```json
{
  "project_id": "<project-id>",
  "description": "Update the existing summarizer to return five bullets and include an explicit unknown answer when the source lacks evidence. Preserve the existing inputs, outputs and integrations.",
  "publish": false
}
```

Supported direct operations are `add_node`, `remove_node`, `update_node`, `add_edge` and `remove_edge`. Removing a node also removes connected edges. New node IDs use `<type>-<next-index>`: if `llm-0` exists, the next LLM is `llm-1`. Use actual node schemas and IDs from the current graph; do not invent generic node payloads.

Publishing does not itself run the workflow, but it changes the version future production runs use. Validation checks the draft and is not a substitute for reviewing the published version or testing real integration behavior.

## Confirm the published result

Call `projects_get(version="published")` and verify the intended change. A successful edit is not proof of publication: check `published` and `publish_error` first. Run only after reviewing the published inputs and external actions.

## Tool reference

* [projects\_get](https://docs.stackai.com/stackai-mcp/tool-reference/projects-and-workflow-authoring/projects-get.md)
* [projects\_edit](https://docs.stackai.com/stackai-mcp/tool-reference/projects-and-workflow-authoring/projects-edit.md)
* [projects\_validate](https://docs.stackai.com/stackai-mcp/tool-reference/projects-and-workflow-authoring/projects-validate.md)
* [catalog\_list](https://docs.stackai.com/stackai-mcp/tool-reference/connections-knowledge-and-discovery/catalog-list.md)
* [connections\_list](https://docs.stackai.com/stackai-mcp/tool-reference/connections-knowledge-and-discovery/connections-list.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-mcp/workflow-recipes/edit-validate-and-publish-deliberately.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
