-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Bug Description
The projects_write tool has an ID mismatch between its add_project_item and update_project_item methods.
add_project_item returns a GraphQL node ID (string, e.g. "PVTI_lADOBII0s..."), but update_project_item expects a numeric REST API database ID (item_id typed as number, parsed via RequiredBigInt). This means the ID returned by one method cannot be directly used as input to the other.
Steps to Reproduce
- Call
projects_writewithmethod: add_project_itemto add an issue to a project - The response returns an
idlike"PVTI_lADODr_Ky84BNQJ7zgmwpT4"(GraphQL node ID string) - Call
projects_writewithmethod: update_project_item, passing thatidasitem_id - The tool rejects it with:
parameter item_id is not of type float64
Root Cause
There are two ID systems at play:
| ID System | Type | Example | Used By |
|---|---|---|---|
REST API id / fullDatabaseId |
number (int64/BigInt) | 1001 |
update_project_item's item_id param |
GraphQL node id |
string (ID!) | "PVTI_lADOBII0s..." |
add_project_item's return value |
In the source (pkg/github/projects.go), item_id is defined as Type: "number" and parsed with RequiredBigInt(args, "item_id"), which is correct for the REST API's numeric ID. However, the return value from add_project_item appears to be the GraphQL node ID (string), creating a mismatch.
Suggested Fix
One of:
- Preferred: Have
add_project_itemalso return the numericfullDatabaseIdso it can be used withupdate_project_item - Have
update_project_itemaccept the GraphQL node ID and resolve it to the numeric ID internally - Document which ID format each method expects/returns, so callers know to look up the numeric ID separately
Workaround
Using gh project item-edit via CLI works fine with the GraphQL node ID string.
Environment
- MCP endpoint:
https://api.githubcopilot.com/mcp/ - Toolset:
default,projects - Client: Claude Code via
mcp-remote