feat(server): add org, team, and user tools #15

Merged
David merged 1 commit from feat/orgs-teams-users-tools-fjmcp-14 into main 2026-06-14 21:58:07 +02:00
Owner

Expose every non-helper operation in fj_core::org (18 ops), fj_core::org::team (10 ops), and fj_core::user (30 ops; user::get_current stays the existing whoami) as MCP tools, completing phase 4 of the tool-surface expansion. Each tool carries its FJMCP-10 permission tier: READ runs unconditionally, EDIT tools call require(Tier::Edit), and DELETE tools call require(Tier::Delete).

The org/team list endpoints that return (headers, items) tuples are unwrapped to return just the items as JSON, matching the plain-Vec shape of the existing list tools. Membership checks (is_org_member, is_org_public_member) follow the fj binary's is_ok() semantics and return a { ..., is_member } boolean. Enum arguments (org visibility, team permission, user-search sort, repo order_by) resolve through a shared serde-based parse helper that mirrors parse_package_type, and activity-feed date filters parse a YYYY-MM-DD argument.

The user-module list_current_orgs wrapper is exposed as list_my_orgs_for_user to resolve the name clash with the org-module list_my_orgs; both call the same endpoint and return the same result, which the tool description notes. get_info instructions and the README tool tables are updated for all 58 new tools.

#FJMCP-14

Expose every non-helper operation in fj_core::org (18 ops), fj_core::org::team (10 ops), and fj_core::user (30 ops; user::get_current stays the existing whoami) as MCP tools, completing phase 4 of the tool-surface expansion. Each tool carries its FJMCP-10 permission tier: READ runs unconditionally, EDIT tools call require(Tier::Edit), and DELETE tools call require(Tier::Delete). The org/team list endpoints that return (headers, items) tuples are unwrapped to return just the items as JSON, matching the plain-Vec shape of the existing list tools. Membership checks (is_org_member, is_org_public_member) follow the fj binary's is_ok() semantics and return a { ..., is_member } boolean. Enum arguments (org visibility, team permission, user-search sort, repo order_by) resolve through a shared serde-based parse helper that mirrors parse_package_type, and activity-feed date filters parse a YYYY-MM-DD argument. The user-module list_current_orgs wrapper is exposed as list_my_orgs_for_user to resolve the name clash with the org-module list_my_orgs; both call the same endpoint and return the same result, which the tool description notes. get_info instructions and the README tool tables are updated for all 58 new tools. #FJMCP-14
feat(server): add org, team, and user tools
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 38s
Create release / Create release from merged PR (pull_request) Has been skipped
5f9b7f9657
Expose every non-helper operation in fj_core::org (18 ops), fj_core::org::team (10 ops), and fj_core::user (30 ops; user::get_current stays the existing whoami) as MCP tools, completing phase 4 of the tool-surface expansion. Each tool carries its FJMCP-10 permission tier: READ runs unconditionally, EDIT tools call require(Tier::Edit), and DELETE tools call require(Tier::Delete).

The org/team list endpoints that return (headers, items) tuples are unwrapped to return just the items as JSON, matching the plain-Vec shape of the existing list tools. Membership checks (is_org_member, is_org_public_member) follow the fj binary's is_ok() semantics and return a { ..., is_member } boolean. Enum arguments (org visibility, team permission, user-search sort, repo order_by) resolve through a shared serde-based parse helper that mirrors parse_package_type, and activity-feed date filters parse a YYYY-MM-DD argument.

The user-module list_current_orgs wrapper is exposed as list_my_orgs_for_user to resolve the name clash with the org-module list_my_orgs; both call the same endpoint and return the same result, which the tool description notes. get_info instructions and the README tool tables are updated for all 58 new tools.

#FJMCP-14
David merged commit 25e07691a6 into main 2026-06-14 21:58:07 +02:00
David deleted branch feat/orgs-teams-users-tools-fjmcp-14 2026-06-14 21:58:07 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/forgejo-mcp!15
No description provided.