feat(agent-toolkit): add workflow-builder read tools (get_workflow / list_workflows)#433
Open
jonathanHeiss1 wants to merge 3 commits into
Open
Conversation
…ows) Adds two read-only MCP tools that expose standalone, workspace-level workflows (distinct from board automations) via the workflow-builder subgraph on the dev GraphQL API version: - get_workflow (READ) — fetch one or more workflows by object ID, returning metadata and ordered steps. - list_workflows (READ) — cursor-paginated list of the account's live workflows. Both reuse a shared read-model mapper so they return identical workflow shapes, following the existing list_automations tool pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two read-only MCP tools that expose standalone, workspace-level workflows (Workflow Builder — distinct from board automations) through the workflow-builder subgraph on the
devGraphQL API version, following the same pattern as the existinglist_automationstool and theworkflow-builder-toolsfamily (create_workflow, etc.):get_workflow(READ) — fetch one or more workflows by workflow object ID, returning metadata + the ordered list of steps. IDs that don't resolve are omitted.list_workflows(READ) — cursor-paginated list of the account's live (published) workflows.Both call
workflows(ids)/live_workflows_page(pagination)viamondayApi.request(..., { versionOverride: 'dev' })and share a single read-model mapper so they return identical workflow shapes (id, title, description, active, created_at, updated_at, steps[{ node_id, block_reference_id, title }]).Why
When a user interacts with the platform MCP there is currently no way to read a Workflow Builder workflow's definition —
create/update/plan/publish_workflowexist, but noget/list. This closes that gap, mirroring how automations already havelist_automations.Notes
devAPI (theENABLE_EXTERNAL_WORKFLOW_GRAPHQL_APIflag from feat(agent-toolkit): add workflows tools (list/activate/deactivate/delete) #346); no client-side flag is added, matching the existingcreate_workflowtool.graphql.devtypes (WorkflowAutomation,LiveWorkflowAutomationsPage,WorkflowAutomationsPaginationInput).Test plan
yarn jest— 14 new unit tests pass (id→variable mapping, null filtering, pagination cursor/hasMore,versionOverride: 'dev', zod validation, error paths)eslint— clean on all new/changed filestsc --noEmit— no new errors (the two pre-existingTS2589errors insrc/mcp/toolkit.tsreproduce on cleanmaster)ENABLE_EXTERNAL_WORKFLOW_GRAPHQL_APIenabledMade with Cursor