Skip to content

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.

  • A project-scoped token, same requirement as add_item_to_project.
  • The item’s node ID — from add_item_to_project’s result or from get_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.
  1. Pick the value shape matching the field’s type:

    Field type value
    Text { "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": "..." }
  2. Call set_field_value:

    {
    "projectOwnerLogin": "your-org",
    "projectNumber": 1,
    "itemId": "PVTI_...",
    "fieldId": "PVTF_...",
    "value": { "kind": "singleSelect", "optionId": "..." }
    }
  3. Read the response: { itemId }.

  • Reload the project board and confirm the item’s field shows the new value.
  • Call get_project_items and check that the item’s fieldValues array now includes the updated field.

See also: tool reference.