Assign work
Replace the placeholders with values from your own authorized scope before copying this prompt into an MCP client.
Inputs
{{workspace_id}}Stable workspace ID.{{application_id}}Stable application ID.{{definition}}Reviewed assignment set including stable principals, member selectors, dates and controls.{{save_key}}Stable key for saving the version.{{publish_key}}Separate stable key for authorized publication.{{effective_from}},{{effective_to}}, and{{due_at}}UTC timestamps for the example's assignment window and due time.
Prompt
For {{workspace_id}} / {{application_id}}, resolve the subjects or groups and exact selectors in {{definition}}.
Use read_v2_program with application.assignment.list to find the assignment set's current stateRevision and next version. Page until you find the ID or establish it is new. Only a new set starts at state revision 0 and version 1. Read application.state.read for metadataRevision, policyRevision and schemaEpoch.
Call execute_v2_application_assignment with application.assignment.save, definition {{definition}}, expectedStateRevision, expectedMetadataRevision, expectedPolicyRevision and expectedSchemaEpoch, and idempotency_key {{save_key}}.
Read that exact assignmentSetId and version with application.assignment.read. Verify the saved definition and definitionDigest. Refresh the application revisions and use the returned assignment stateRevision.
Call execute_v2_application_assignment with application.assignment.publish, assignmentSetId, version, the four refreshed expected revisions, and idempotency_key {{publish_key}}. Read the exact version again and report its Published status, definitionDigest, scope and publication operationId.
Stop on a changed revision, missing access or a principal, selector or reviewer chain that differs from the authorized definition.
Example inputs
In the disposable Operating Data Cube, this definition assigns one cell to a test subject with one reviewer and an explicit due time. Use the workspace and subject IDs from your fixture. For a workflow you will start today, set effectiveFrom to one day before the current UTC time, effectiveTo to seven days after it, and dueAt to two days after it. Keep the exact values for replay. Save version 1, then check that publishing returns the same definition digest and that reading version 1 reports Published.
{
"format": "openepm-application-assignment-set-v1",
"workspaceId": "{{workspace_id}}",
"applicationId": "operating-cube",
"assignmentSetId": "docs.coordinate-review",
"version": 1,
"name": "Operating Data Cube review",
"effectiveFrom": "{{effective_from}}",
"effectiveTo": "{{effective_to}}",
"assignments": [
{
"assignmentId": "point-a-review",
"name": "Point A review",
"subjects": [
"assigned-worker"
],
"groups": [],
"memberSelectors": {
"Account": [
"InputA"
],
"Entity": [
"PointA"
],
"Year": [
"Y2027"
],
"Period": [
"P01"
],
"View": [
"Input"
],
"Value": [
"Raw"
],
"Custom01": [
"ItemA"
],
"Scenario": [
"Actual"
],
"DataType": [
"InputData"
]
},
"reviewerChain": [
{
"kind": "Subject",
"id": "fixture-owner"
}
],
"dueAt": "{{due_at}}",
"controls": {
"reassignable": false,
"maxReassignments": 0,
"delegationAllowed": false,
"maxDelegationDepth": 0,
"delegationExpiresAt": null
}
}
]
}
Tools used include read_v2_program, execute_v2_application_assignment. See the module guidelines and tool index.