feat(server): add org, team, and user tools #15
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/orgs-teams-users-tools-fjmcp-14"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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