> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp.md). Agents can also search and read this documentation through its [MCP server](https://docs.docbits.com/~gitbook/mcp).

# Workflows & Cards (DocFlow)

DocFlow exposes a **Model Context Protocol (MCP)** server that lets AI assistants manage workflows and partner cards programmatically. Any MCP-compatible client — Claude Code, Claude Desktop, OpenAI Codex, or custom integrations — can connect and use these tools.

## What Can You Do?

With DocFlow MCP you can:

* **List, create, update, and delete** advanced workflows
* **Test workflows** with real or mock documents
* **Build custom cards** using the Partner Card SDK
* **Validate, test, approve, and manage** partner card submissions
* **Import cards** directly from GitHub repositories

## Tools Overview

DocFlow MCP groups its tools into the following categories. Workflows themselves are created and edited in the DocFlow designer; the MCP reads, tests, runs and deletes them. Most workflow- and Card-SDK tools mirror existing REST endpoints — see the API reference for those. The categories below cover the MCP-specific surface and the workflow concepts you need to use it.

### Workflow Management

| Tool                                                | Description                                     |
| --------------------------------------------------- | ----------------------------------------------- |
| `list_workflows`                                    | List all workflows for the current organization |
| `get_workflow`                                      | Get details of a specific workflow by ID        |
| `delete_workflow`                                   | Delete a workflow by ID                         |
| `list_workflow_variables` / `set_workflow_variable` | Read and set workflow variables                 |

### Workflow Testing

| Tool                                               | Description                                                                 |
| -------------------------------------------------- | --------------------------------------------------------------------------- |
| `test_advanced_workflow`                           | Test an advanced workflow execution with optional document                  |
| `run_workflow_with_assertions`                     | Seed variables, run a workflow with the real executor and check the outcome |
| `list_test_scenarios`                              | List all workflow test scenarios                                            |
| `list_cards`                                       | List available workflow cards/actions                                       |
| `search_workflow_logs` / `get_workflow_log_detail` | Find and inspect workflow runs                                              |

### Card SDK Management

| Tool                        | Description                               |
| --------------------------- | ----------------------------------------- |
| `sdk_list_submissions`      | List all partner card submissions         |
| `sdk_get_submission_status` | Get validation status for a submission    |
| `sdk_approve_card`          | Approve a validated partner card (admin)  |
| `sdk_reject_card`           | Reject a partner card submission (admin)  |
| `sdk_delete_submission`     | Deactivate or delete a submission (admin) |
| `sdk_list_cards_picker`     | List all enabled cards with role flags    |

### Card SDK Development

| Tool                | Description                                |
| ------------------- | ------------------------------------------ |
| `sdk_create_card`   | Create a new partner card from source code |
| `sdk_validate_card` | Run validation pipeline without saving     |
| `sdk_test_card`     | Execute a card in a sandboxed environment  |
| `sdk_import_github` | Import a partner app from GitHub           |

## Getting Started

1. [Set up your MCP client](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp/setup-and-configuration.md)
2. Learn about [Workflow Tools](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp/workflow-tools.md)
3. Explore the [Card SDK Tools](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp/card-sdk-tools.md)
4. Follow end-to-end [Examples](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp/examples.md)

{% hint style="info" %}
DocFlow MCP uses **Streamable HTTP** transport. The server endpoint is `/v3/mcp/` on the DocFlow host (e.g. `https://docflow.docbits.com/v3/mcp/`). See [Setup & Configuration](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp/setup-and-configuration.md) for the full URL list.
{% endhint %}


---

# 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.docbits.com/advanced-functions-and-tools/docbits-mcp/docflow-mcp.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.
