Summary
The Projects comment tool (twprojects-create_comment, and twprojects-update_comment) provides no way to mark a comment private. Teamwork's product supports comment privacy, and the Spaces side of this repo already exposes it (twspaces-create_comment has an isPrivate param — internal/twspaces/comments.go:152), but the Projects equivalent never got it.
This blocks a common workflow: keeping development/internal comments private until they're ready for a client to review.
Current state
Privacy is absent at two layers:
- MCP tool —
internal/twprojects/comments.go exposes only object, body, content_type, notify_current_user, notify.
- SDK —
projects.CommentCreateRequest / CommentUpdateRequest (teamwork/twapi-go-sdk) carry only Body, ContentType, NotifyCurrentUser, Notify, so the typed struct the tool marshals can't carry a privacy flag.
- API —
CommentCreate POSTs to the v1 endpoint /{resource}/{id}/comments.json with {"comment":{…}}. The v1 comment object carries a private field, and the product supports choosing who a comment is private to (support docs), so the capability exists in the API — it's just not surfaced.
Proposed change
Prerequisite — SDK (teamwork/twapi-go-sdk):
This repo (internal/twprojects/comments.go):
Notes
The MCP tool change is blocked on the SDK release. An alternative that avoids the SDK dependency — having the handler POST a raw request body directly — was considered but rejected as it runs against the repo's typed-SDK conventions.
Summary
The Projects comment tool (
twprojects-create_comment, andtwprojects-update_comment) provides no way to mark a comment private. Teamwork's product supports comment privacy, and the Spaces side of this repo already exposes it (twspaces-create_commenthas anisPrivateparam —internal/twspaces/comments.go:152), but the Projects equivalent never got it.This blocks a common workflow: keeping development/internal comments private until they're ready for a client to review.
Current state
Privacy is absent at two layers:
internal/twprojects/comments.goexposes onlyobject,body,content_type,notify_current_user,notify.projects.CommentCreateRequest/CommentUpdateRequest(teamwork/twapi-go-sdk) carry onlyBody,ContentType,NotifyCurrentUser,Notify, so the typed struct the tool marshals can't carry a privacy flag.CommentCreatePOSTs to the v1 endpoint/{resource}/{id}/comments.jsonwith{"comment":{…}}. The v1 comment object carries aprivatefield, and the product supports choosing who a comment is private to (support docs), so the capability exists in the API — it's just not surfaced.Proposed change
Prerequisite — SDK (
teamwork/twapi-go-sdk):isprivate0/1; verify whether privacy also accepts a user/company-ID recipient list).CommentCreateRequestandCommentUpdateRequestwithomitempty.go.modin this repo.This repo (
internal/twprojects/comments.go):privateparam toCommentCreate'sInputSchema, mirroring thetwspacesisPrivatestyle (AnyOf: [boolean, null]). If the API supports targeted recipients, model that with the existinghelpers.UserGroupsSchemapattern already used fornotify.helpers.OptionalPointerParam.CommentUpdate.comments_test.goasserting the privacy field serializes into the request body (using the existingmcpServerMock/toolRequesthelpers).Notes
The MCP tool change is blocked on the SDK release. An alternative that avoids the SDK dependency — having the handler POST a raw request body directly — was considered but rejected as it runs against the repo's typed-SDK conventions.