Browse Source

docs: add documentation standards and unimplemented API endpoints table #6

- Updated CLAUDE.md with comprehensive documentation standards
  - Added README.md update guidelines for new features
  - Added CLAUDE.md update guidelines for architecture changes
  - Documented when and how to maintain documentation
  - Added section on tracking undocumented API endpoints

- Updated README.md with complete feature documentation
  - Added Organization Management tools section with all 6 tools
  - Added Team Management tools section with all 5 tools
  - Created comprehensive table of 26 documented but unimplemented endpoints
  - Categorized by: User Admin, Repository Admin, Team Admin, Keys, Webhooks, Collaborators, Releases
  - Included direct links to official Gogs API documentation
  - Added "Contributing New Endpoints" guidelines for contributors

This addresses the requirements in #6 to maintain up-to-date documentation
and track potential future implementations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
claude 9 months ago
parent
commit
e0d4057733
2 changed files with 151 additions and 1 deletions
  1. 30 1
      CLAUDE.md
  2. 121 0
      README.md

+ 30 - 1
CLAUDE.md

@@ -32,6 +32,9 @@ The server exposes tools in these categories:
 - **Repository Management**: list_user_repositories, search_repositories, get_repository, create_repository, delete_repository
 - **Content Access**: get_contents, get_raw_content, list_branches, get_commits
 - **Issue Tracking**: list_issues, get_issue, create_issue, update_issue, list_issue_comments, create_issue_comment, update_issue_comment
+- **Label Management**: list_labels, get_label, create_label, update_label, delete_label, list_issue_labels, add_issue_labels, remove_issue_label, replace_issue_labels, remove_all_issue_labels
+- **Organization Management**: list_user_organizations, create_organization, list_public_organizations, get_organization, update_organization, add_organization_member
+- **Team Management**: list_organization_teams, create_team, get_team, add_team_member, remove_team_member
 
 ## Development Commands
 
@@ -100,7 +103,33 @@ When working on issues in this repository:
 ## Issue handling
  - always update the issue which you works on
  - always add label to the issue if no label added
- - always write comment with the current status of the work 
+ - always write comment with the current status of the work
  - when you create commit message, mention the issue if exists
  - never close the issue
 
+## Documentation Standards
+
+When working on this project, maintaining up-to-date documentation is critical:
+
+### README.md Updates
+- **Always update README.md** when adding new features, tools, or API endpoints
+- Add new tools to the "Available Tools" section with full parameter documentation
+- Update feature lists when implementing new capabilities
+- Keep the documentation in sync with actual implementation
+
+### CLAUDE.md Updates
+- Update MCP Tool Categories when adding new tool categories
+- Document any new architecture patterns or components
+- Add development guidelines for new features or patterns
+- Update build commands if the build process changes
+
+### Documentation Guidelines
+1. **When adding new MCP tools**: Document in both CLAUDE.md (for developers) and README.md (for users)
+2. **When implementing API endpoints**: Add to the undocumented endpoints table if not in official docs
+3. **When changing architecture**: Update the Core Components section in CLAUDE.md
+4. **When adding dependencies**: Document any new configuration or setup steps
+5. **Before committing**: Always ensure documentation reflects the current state of the codebase
+
+### Undocumented API Endpoints
+Maintain a table in README.md of any Gogs API endpoints that work but are not officially documented. This helps users understand full capabilities and helps track potential features for future Gogs API documentation.
+

+ 121 - 0
README.md

@@ -45,6 +45,21 @@ This MCP server provides tools to:
   - Replace all labels on an issue
   - Remove all labels from an issue
 
+- **Organization Management**
+  - List organizations for authenticated user
+  - Create new organization
+  - List public organizations for a user
+  - Get organization details
+  - Update organization information
+  - Add/update organization member with role
+
+- **Team Management**
+  - List teams in an organization
+  - Create new team
+  - Get team details
+  - Add member to a team
+  - Remove member from a team
+
 ## Installation
 
 ### Prerequisites
@@ -475,6 +490,112 @@ Remove all labels from an issue.
 - `repo` (string, required): Repository name
 - `number` (number, required): Issue number
 
+### Organization Management Tools
+
+#### `list_user_organizations`
+List organizations for the authenticated user.
+- No parameters required
+
+#### `create_organization`
+Create a new organization.
+- `username` (string, required): Organization username (alphanumeric, dashes, underscores)
+- `full_name` (string, optional): Organization full name
+- `description` (string, optional): Organization description
+- `website` (string, optional): Organization website
+- `location` (string, optional): Organization location
+
+#### `list_public_organizations`
+List public organizations for a specific user.
+- `username` (string, required): Username to get public organizations for
+
+#### `get_organization`
+Get information about a specific organization.
+- `orgname` (string, required): Organization name
+
+#### `update_organization`
+Update an organization (requires owner permissions).
+- `orgname` (string, required): Organization name
+- `full_name` (string, optional): Organization full name
+- `description` (string, optional): Organization description
+- `website` (string, optional): Organization website
+- `location` (string, optional): Organization location
+
+#### `add_organization_member`
+Add or update organization membership (requires owner permissions).
+- `orgname` (string, required): Organization name
+- `username` (string, required): Username to add as member
+- `role` (string, required): Member role - 'admin' or 'member'
+
+### Team Management Tools
+
+#### `list_organization_teams`
+List teams in an organization.
+- `orgname` (string, required): Organization name
+
+#### `create_team`
+Create a new team in an organization (requires admin permissions).
+- `orgname` (string, required): Organization name
+- `name` (string, required): Team name (max 30 characters, alphanumeric with dashes and dots)
+- `description` (string, optional): Team description (max 255 characters)
+- `permission` (string, optional): Team permission level - 'read', 'write', or 'admin' (default: 'read')
+
+#### `get_team`
+Get information about a specific team.
+- `teamId` (number, required): Team ID
+
+#### `add_team_member`
+Add a user to a team (requires admin permissions).
+- `teamId` (number, required): Team ID
+- `username` (string, required): Username to add to the team
+
+#### `remove_team_member`
+Remove a user from a team (requires admin permissions).
+- `teamId` (number, required): Team ID
+- `username` (string, required): Username to remove from the team
+
+## Documented but Not Yet Implemented API Endpoints
+
+The following Gogs API v1 endpoints are officially documented but not yet implemented in this MCP server. These represent potential features for future development:
+
+| Category | Endpoint | Method | Description | Documentation |
+|----------|----------|--------|-------------|---------------|
+| **User Administration** | `/admin/users` | POST | Create a new user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#create-a-new-user) |
+| **User Administration** | `/admin/users/:username` | PATCH | Edit an existing user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#edit-an-existing-user) |
+| **User Administration** | `/admin/users/:username` | DELETE | Delete a user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#delete-a-user) |
+| **User Administration** | `/admin/users/:username/keys` | POST | Create public key for user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#create-a-public-key-for-user) |
+| **Repository Administration** | `/admin/users/:username/repos` | POST | Create repository for user/org | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Repositories.md) |
+| **Team Administration** | `/admin/teams/:teamid/members` | GET | List all members of a team | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#list-all-members-of-a-team) |
+| **Team Administration** | `/admin/teams/:teamid/repos/:reponame` | PUT | Add or update team repository | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#add-or-update-team-repository) |
+| **Team Administration** | `/admin/teams/:teamid/repos/:reponame` | DELETE | Remove team repository | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#remove-team-repository) |
+| **Public Keys** | `/users/:username/keys` | GET | List public keys for a user | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
+| **Public Keys** | `/user/keys` | GET | List your public keys | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
+| **Public Keys** | `/user/keys/:id` | GET | Get a single public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
+| **Public Keys** | `/user/keys` | POST | Create a public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
+| **Public Keys** | `/user/keys/:id` | DELETE | Delete a public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
+| **Deploy Keys** | `/repos/:username/:reponame/keys` | GET | List deploy keys | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
+| **Deploy Keys** | `/repos/:username/:reponame/keys/:id` | GET | Get a deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
+| **Deploy Keys** | `/repos/:username/:reponame/keys` | POST | Add a new deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
+| **Deploy Keys** | `/repos/:username/:reponame/keys/:id` | DELETE | Remove a deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
+| **Webhooks** | `/repos/:username/:reponame/hooks` | GET | List hooks | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
+| **Webhooks** | `/repos/:username/:reponame/hooks` | POST | Create a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
+| **Webhooks** | `/repos/:username/:reponame/hooks/:id` | PATCH | Edit a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
+| **Webhooks** | `/repos/:username/:reponame/hooks/:id` | DELETE | Delete a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
+| **Collaborators** | `/repos/:username/:reponame/collaborators` | GET | Get collaborators | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
+| **Collaborators** | `/repos/:username/:reponame/collaborators/:collaborator` | PUT | Add user as a collaborator | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
+| **Collaborators** | `/repos/:username/:reponame/collaborators/:collaborator` | DELETE | Delete collaborator | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
+| **Releases** | `/repos/:owner/:repo/releases` | GET | List releases | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Releases.md) |
+
+### Contributing New Endpoints
+
+If you'd like to help implement any of these endpoints:
+
+1. Check the official [Gogs API documentation](https://github.com/gogs/docs-api) for endpoint details
+2. Add the method to `src/gogs-client.ts` with proper TypeScript types
+3. Add the Zod schema and tool definition to `src/server.ts`
+4. Test the endpoint against a real Gogs instance
+5. Update this README with the new tool documentation
+6. Submit a pull request
+
 ## Development
 
 ### Run in Development Mode