Skip to content

Commit 2b62538

Browse files
authored
API Updates (#7)
1 parent fea80f5 commit 2b62538

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

dbos_mcp/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ async def list_workflows(
161161
status: str | None = None,
162162
application_version: str | None = None,
163163
forked_from: str | None = None,
164+
parent_workflow_id: str | None = None,
164165
queue_name: str | None = None,
165166
limit: int | None = None,
166167
offset: int | None = None,
@@ -191,6 +192,8 @@ async def list_workflows(
191192
body["application_version"] = application_version
192193
if forked_from is not None:
193194
body["forked_from"] = forked_from
195+
if parent_workflow_id is not None:
196+
body["parent_workflow_id"] = parent_workflow_id
194197
if queue_name is not None:
195198
body["queue_name"] = queue_name
196199
if limit is not None:

dbos_mcp/server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ async def list_workflows(
8181
status: str | None = None,
8282
application_version: str | None = None,
8383
forked_from: str | None = None,
84+
parent_workflow_id: str | None = None,
8485
queue_name: str | None = None,
8586
limit: int | None = None,
8687
offset: int | None = None,
@@ -103,6 +104,7 @@ async def list_workflows(
103104
status (string, optional): Filter by status - PENDING, SUCCESS, ERROR, CANCELLED, ENQUEUED, or MAX_RECOVERY_ATTEMPTS_EXCEEDED
104105
application_version (string, optional): Filter by application version
105106
forked_from (string, optional): Filter to workflows forked from this workflow ID
107+
parent_workflow_id (string, optional): Filter to child workflows of this parent workflow ID
106108
queue_name (string, optional): Filter by workflow queue name
107109
limit (int, optional): Maximum number of workflows to return
108110
offset (int, optional): Number of workflows to skip (for pagination)
@@ -137,6 +139,8 @@ async def list_workflows(
137139
- Priority (string, optional): Priority of the workflow on the queue (1-2147483647, lower is higher priority)
138140
- QueuePartitionKey (string, optional): If this workflow is enqueued on a partitioned queue, its partition key
139141
- ForkedFrom (string, optional): If this workflow was forked from another, that workflow's ID
142+
- ParentWorkflowID (string, optional): If this is a child workflow, the ID of the parent workflow that started it
143+
- DequeuedAt (string, optional): When this workflow was dequeued from its queue (Unix epoch milliseconds)
140144
count (int): Number of workflows returned
141145
application (string): Name of the application queried
142146
"""
@@ -150,6 +154,7 @@ async def list_workflows(
150154
status=status,
151155
application_version=application_version,
152156
forked_from=forked_from,
157+
parent_workflow_id=parent_workflow_id,
153158
queue_name=queue_name,
154159
limit=limit,
155160
offset=offset,
@@ -202,6 +207,8 @@ async def get_workflow(
202207
Priority (string, optional): Priority of the workflow on the queue (1-2147483647, lower is higher priority)
203208
QueuePartitionKey (string, optional): If this workflow is enqueued on a partitioned queue, its partition key
204209
ForkedFrom (string, optional): If this workflow was forked from another, that workflow's ID
210+
ParentWorkflowID (string, optional): If this is a child workflow, the ID of the parent workflow that started it
211+
DequeuedAt (string, optional): When this workflow was dequeued from its queue (Unix epoch milliseconds)
205212
"""
206213
return await client.get_workflow(
207214
application_name=application_name,
@@ -260,6 +267,7 @@ async def list_executors(
260267
- application_id (string): The application ID
261268
- application_version (string): Version of the application running on this executor
262269
- status (string): HEALTHY, DISCONNECTED, or DEAD
270+
- host_id (string, optional): Host identifier of the executor
263271
- hostname (string, optional): Hostname of the executor
264272
- created_at (string): When the executor connected (Unix epoch milliseconds)
265273
- updated_at (string): Last heartbeat time (Unix epoch milliseconds)

0 commit comments

Comments
 (0)