Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

The GitHub MCP server's list_project_items and get_project_item tools don't return the content.url field for linked issues/PRs, preventing workflows from generating reports with proper GitHub URLs.

Changes

New Safe Output Tool

  • list_project_items_with_urls: New safe output tool that queries the GitHub GraphQL API directly to return project items with full content information including URLs
  • JavaScript Handler (actions/setup/js/list_project_items_with_urls.cjs): Implements GraphQL queries to fetch project items with complete data including:
    • Issue/PR URLs, titles, numbers, and states
    • Repository information (owner, name)
    • Draft issue information
    • Custom field values
  • Comprehensive Tests (actions/setup/js/list_project_items_with_urls.test.cjs): Test suite covering org/user projects, pagination, and error handling

Go Integration (In Progress)

  • Configuration (pkg/workflow/list_project_items_with_urls.go): Parse and manage tool configuration
  • Job Builder (pkg/workflow/list_project_items_with_urls_job.go): Create GitHub Actions jobs for the tool
  • Compiler Integration: Registered in compiler types and safe outputs configuration
  • Tool Schema (pkg/workflow/js/safe_outputs_tools.json): Added tool definition with input schema

Usage

tools:
  github:
    toolsets: [projects]

safe-outputs:
  list-project-items-with-urls:
    github-token: ${{ secrets.PROJECTS_PAT }}
    max: 5

Agent can then call the tool:

{
  "project": "https://github.com/orgs/myorg/projects/123",
  "first": 100
}

Returns project items with full URLs:

{
  "items": [
    {
      "id": "PVTI_item1",
      "type": "ISSUE",
      "content": {
        "type": "Issue",
        "number": 42,
        "title": "Issue Title",
        "url": "https://github.com/owner/repo/issues/42",
        "state": "OPEN",
        "repository": {
          "owner": "owner",
          "name": "repo"
        }
      },
      "fields": {
        "Status": "In Progress"
      }
    }
  ],
  "count": 1
}

Implementation Status

The tool implementation is partially complete:

  • ✅ JavaScript handler with GraphQL queries
  • ✅ Comprehensive test suite
  • ✅ Tool schema definition
  • 🚧 Go compiler integration (requires completion of safe outputs config generation)

This provides a native solution within gh-aw rather than requiring users to implement workarounds.

Original prompt

Suggest possible workaround for obtaining resolved urls when using github mcp projoects tools:
Since the GitHub MCP Projects tools don't directly provide issue URLs in a simple format, and I don't have direct GraphQL API access with proper authentication in this environment, let me work with the sample data we have and create a report based on my analysis of project item metadata. However, I need to note that I cannot extract the full GitHub issue URLs from the project items using the available tools, which is a critical requirement for your task.
To complete this task properly, you need one of these approaches:

  1. Enhanced Tool Access: Request that the github-list_project_items tool be updated to return the content.url field for linked issues/PRs

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@mnkiefer mnkiefer marked this pull request as ready for review January 8, 2026 08:32
@mnkiefer
Copy link
Contributor

mnkiefer commented Jan 8, 2026

@copilot: Explore fixes, don't suggest workarounds.

Copilot AI changed the title [WIP] Request enhanced tool access for obtaining issue URLs Document workarounds for missing content.url in GitHub MCP Projects tools Jan 8, 2026
Copilot AI requested a review from mnkiefer January 8, 2026 08:42
Copy link
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot: Explore fixes, don't suggest workarounds.

You're right - I'll implement a proper fix instead of workarounds. I'm creating a custom MCP tool that queries the GitHub GraphQL API directly to return project items with their full content URLs. This will provide the missing functionality natively within gh-aw rather than requiring users to implement workarounds.

Copilot AI changed the title Document workarounds for missing content.url in GitHub MCP Projects tools Add native list_project_items_with_urls tool for GitHub Projects Jan 8, 2026
@mnkiefer
Copy link
Contributor

mnkiefer commented Jan 8, 2026

  • Closing as no longer needed

@mnkiefer mnkiefer closed this Jan 8, 2026
@mnkiefer mnkiefer deleted the copilot/request-enhanced-tool-access branch January 8, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants