github-mcp-server
github-mcp-server copied to clipboard
Add create_discussion tool to discussions toolset
Closes #1517
This PR adds a new create_discussion tool to the discussions toolset, enabling programmatic creation of GitHub Discussions through the MCP server.
Changes
- Added
CreateDiscussionfunction inpkg/github/discussions.gousing GraphQL mutation - Implemented comprehensive unit tests covering success and error scenarios
- Updated discussions toolset to include the new write tool
- Generated toolsnap for schema validation
Testing
- All existing tests pass
- New tests cover:
- Successful discussion creation
- Organization-level discussions
- Missing parameter validation
- Repository and category not found errors
- Linter passes with no issues
- Documentation generated via
script/generate-docs
The tool follows existing patterns in the codebase and integrates cleanly with the current discussions toolset structure.