Files
github--github-mcp-server/pkg/github/__toolsnaps__/issue_graph.snap
Sam Morrow af42b98a71
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
feat(issue_graph): Add issue_graph tool for visualizing issue/PR relationships
Adds the issue_graph tool that provides a comprehensive view of issue and PR
relationships in a GitHub repository. This is designed to be the primary tool
for understanding project status, work hierarchy, and issue dependencies.

Key features:
- Focus parameter: Auto-shift focus to epic/batch parent issues
- Cross-repo support: Discover parent issues via GraphQL and sub-issues via REST
- Status extraction: Parse milestone due dates and status keywords from body/comments
- State reason: Show why issues/PRs are in their current state (completed, merged, etc.)
- Project info: Fetch project name and status for the focus node
- Issue Types: Detect GitHub's native Epic issue type for classification
- Tasklist items: Extract legacy markdown checkbox items from issue body

The tool returns a text-formatted graph showing:
- Node types: epic, batch, task, pr
- Full hierarchy across repositories
- Sub-issues and closes/fixes references
- Cross-references and related work
- Open/closed/merged state of all related items

Closes: #1510
2025-12-07 01:34:18 +01:00

43 lines
1.8 KiB
Plaintext

{
"annotations": {
"readOnlyHint": true,
"title": "Get issue relationship graph"
},
"description": "Get a graph representation of issue and pull request relationships, showing the full work hierarchy in one call.\n\nReturns a comprehensive view including:\n- Node types: epic (large initiatives), batch (parent issues), task (regular issues), pr (pull requests)\n- Full hierarchy: epic → batch → task → PR relationships\n- Sub-issues and \"closes/fixes\" references\n- Cross-references and related work\n- Status updates extracted from issue bodies and comments\n- Open/closed/merged state of all related items\n\nUse focus=\"epic\" to automatically find and focus on the parent epic of any issue.\nUse focus=\"batch\" to find the nearest batch/parent issue in the hierarchy.",
"inputSchema": {
"type": "object",
"required": [
"owner",
"repo",
"issue_number"
],
"properties": {
"focus": {
"type": "string",
"description": "Which node type to focus on: 'provided' (default) uses the specified issue/PR, 'epic' shifts focus to the nearest epic in the hierarchy, 'batch' shifts focus to the nearest batch/parent issue",
"enum": [
"provided",
"epic",
"batch"
]
},
"issue_number": {
"type": "number",
"description": "Issue or pull request number to build the graph from"
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"verbose": {
"type": "boolean",
"description": "Include crawl statistics showing how the graph was traversed (nodes fetched, depth reached, repos accessed, etc.)"
}
}
},
"name": "issue_graph"
}