Skip to content

Create a discussion with create_discussion

Goal: create a new GitHub Discussion in a repository under a named category.

  • The repository has Discussions enabled.
  • You know the exact name of an existing discussion category (case- sensitive match against the repository’s configured categories).
  1. Call create_discussion:

    {
    "owner": "your-org",
    "repo": "your-repo",
    "categoryName": "Ideas",
    "title": "Should we support multi-repo boards natively?",
    "body": "Opening this to gather feedback before filing an ADR."
    }
  2. Read the response: { id, number, title, url }.

  • Open the returned url and confirm the discussion exists under the category you named.
  • If categoryName doesn’t match any category on the repository, the call fails before mutating with { error: "github_api_error", message: 'Discussion category "..." not found in owner/repo', available: [...] } — the available list names the repository’s actual categories, so you can retry with a corrected name.

See also: tool reference.