Set a project field value with set_field_value
Goal: set a Projects v2 item’s field (Status, an iteration, a custom text or number field) to a specific value.
Prerequisites
Section titled “Prerequisites”- A
project-scoped token, same requirement asadd_item_to_project. - The item’s node ID — from
add_item_to_project’s result or fromget_project_items. - The field’s node ID — from a field-listing query or from the project settings UI’s API view; this tool does not resolve a field name to an ID for you.
- Before setting a Status field by hand, check whether GitHub’s native Projects v2 workflows already handle the transition you want — see ADR-0003. Manually setting Todo/Done on a board that has auto-add/auto-close workflows enabled duplicates what the platform already does and can race it.
-
Pick the
valueshape matching the field’s type:Field type valueText { "kind": "text", "text": "..." }Number { "kind": "number", "number": 3 }Date { "kind": "date", "date": "2026-08-01" }Single select (e.g. Status) { "kind": "singleSelect", "optionId": "..." }Iteration { "kind": "iteration", "iterationId": "..." } -
Call
set_field_value:{"projectOwnerLogin": "your-org","projectNumber": 1,"itemId": "PVTI_...","fieldId": "PVTF_...","value": { "kind": "singleSelect", "optionId": "..." }} -
Read the response:
{ itemId }.
Verify it worked
Section titled “Verify it worked”- Reload the project board and confirm the item’s field shows the new value.
- Call
get_project_itemsand check that the item’sfieldValuesarray now includes the updated field.
See also: tool reference.