feat: Add CSV output format for default list tools under insiders mode#2450
Open
RossTarrant wants to merge 1 commit into
Open
feat: Add CSV output format for default list tools under insiders mode#2450RossTarrant wants to merge 1 commit into
RossTarrant wants to merge 1 commit into
Conversation
8e2be4a to
3ada757
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an Insiders-gated CSV output mode for default list_* tools, aiming to reduce response size/context for MCP clients. This is implemented by feature-flagged tool variants that convert the existing JSON text output into a flattened CSV representation.
Changes:
- Added
csv_outputfeature flag (allowlisted and enabled by Insiders mode). - Introduced feature-gated JSON/CSV tool variants for default-toolset
list_*tools, with centralized JSON→CSV conversion (flattening + whitespace normalization). - Wired HTTP mode CLI
--features/--insidersinto feature-flag resolution; added unit tests + Insiders feature documentation.
Show a summary per file
| File | Description |
|---|---|
| cmd/github-mcp-server/main.go | Passes CLI --features into HTTP server config. |
| pkg/http/server.go | Extends HTTP server config with static enabled features; updates feature checker to combine static + header features and insiders mode. |
| pkg/http/server_test.go | Adds coverage for static feature/static insiders behavior in HTTP feature checker. |
| pkg/http/handler_test.go | Updates tests to new feature-checker signature. |
| pkg/github/feature_flags.go | Adds csv_output flag to allowlist + insiders expansion list. |
| pkg/github/tools.go | Wraps tool list construction to inject CSV-output variants for eligible tools. |
| pkg/github/csv_output.go | Implements JSON-text tool-result → flattened CSV conversion and tool handler wrapping. |
| pkg/github/csv_output_test.go | Adds unit tests for CSV conversion + feature-gated tool variants. |
| docs/insiders-features.md | Documents CSV output behavior, format, and how to enable it. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 1
3ada757 to
b070b00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Insiders-gated CSV output mode for default list_ tools to reduce response context for MCP clients.
Why
CSV provides a flatter, more compact representation for list-style responses, helping evaluate token reduction from output format changes.
Refs github/copilot-mcp-core#1323
What changed
MCP impact
CSV mode changes list_* tool (within default toolset) response behavior under the csv_output Insiders feature flag. Tool schemas are unchanged; CSV output is server-controlled by feature flag gating.
Prompts tested (tool changes only)
Security / limits
CSV mode is intended to reduce response size for list tools. Body fields are whitespace-normalized in CSV output; full formatted content remains available through corresponding get/read tools.
Tool renaming
Lint & tests
Docs
docs/insiders-features.mddetailing the new experimental feature