Create an issue with the create_issue tool
Goal: file a new GitHub issue whose body carries MIF frontmatter automatically, optionally with labels, assignees, a milestone, and an organization issue type.
Prerequisites
Section titled “Prerequisites”github-sdlc-planninginstalled and a GitHub token available (env varGITHUB_TOKENorgh auth login).- Write access to the target repository.
- If you pass
labels,assignees, ormilestoneNumber, those labels, users, and milestone must already exist — the tool resolves each to a node ID and fails if the lookup 404s. - If you pass
issueType, it must be one of the organization’s defined issue types (owneris treated as the org login for this lookup) — an unknown name is rejected before the API call. - If you omit
issueType, the tool derives a native issue type frommif.typefor you (Task→Task,Bug→Bug, everything else —Initiative/Epic/Story/Feature— →Feature, the closest fit since this org only defines those three native types). If the org hasn’t defined the derived type, the issue is still created with no native type set rather than failing the call.
-
Decide the MIF metadata for the issue: a
namespace(typically the repo name), anidslug unique within that namespace, and atype— one ofInitiative,Epic,Story,Task,Bug,Feature. -
Call
create_issue:{"owner": "your-org","repo": "your-repo","title": "Fix flaky upload retry","body": "Uploads intermittently fail on slow connections.","labels": ["bug"],"mif": { "id": "flaky-upload-retry", "type": "Bug", "namespace": "your-repo" }} -
Read the response:
{ number, nodeId, url, body }.
Verify it worked
Section titled “Verify it worked”- Open the returned
url. The issue exists with the title and labels you specified. - View the raw body (e.g. via the GitHub API or the “Edit” view) and confirm
it starts with three HTML comments:
<!-- mif-id: ... -->,<!-- mif-type: ... -->,<!-- mif-ns: ... -->— you never need to author these by hand. - If
issueTypewas rejected, the tool call errors before touching the API with{ error: "unknown_issue_type", available: [...] }listing the organization’s actual issue type names.
See also: tool reference.