github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Add create_discussion tool to discussions toolset

Open furkankoykiran opened this issue 4 weeks ago • 0 comments

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 CreateDiscussion function in pkg/github/discussions.go using 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.

furkankoykiran avatar Dec 02 '25 00:12 furkankoykiran