Document payload directory configuration options#702
Merged
Conversation
- Add --payload-dir flag to README Usage section - Add MCP_GATEWAY_PAYLOAD_DIR to Environment Variables table - Document payload_dir configuration in config.example.toml Fixes documentation discrepancies identified in reconciliation report Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing --payload-dir flag in README usage section
Document payload directory configuration options
Feb 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents three previously undocumented configuration options for large payload storage that were implemented in the code but missing from the main documentation files.
Changes:
- Added
--payload-dirCLI flag documentation to README.md usage section - Added
MCP_GATEWAY_PAYLOAD_DIRenvironment variable to README.md environment variables table - Added
payload_dirconfiguration option documentation to config.example.toml with directory structure details
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Added CLI flag and environment variable documentation for payload directory configuration |
| config.example.toml | Added commented example and detailed documentation for the payload_dir gateway option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Nightly reconciliation identified 3 undocumented features for large payload storage. The code supported
--payload-dirflag,MCP_GATEWAY_PAYLOAD_DIRenv var, andpayload_dirconfig option, but none were documented.Changes
--payload-dirflag to usage section with default/tmp/jq-payloadsMCP_GATEWAY_PAYLOAD_DIRto optional variables tablepayload_dirgateway option with session segmentation patternAll three methods configure the same directory where large tool response payloads are stored, organized as
{payload_dir}/{sessionID}/{queryID}/payload.json.Implementation in
internal/cmd/flags_logging.go,internal/config/config_core.go, andinternal/config/config_stdin.gounchanged.Original prompt
This section details on the original issue you should resolve
<issue_title>📚 Documentation Reconciliation Report - 2026-02-05</issue_title>
<issue_description>## Summary
Found 3 discrepancies between documentation and implementation during nightly reconciliation check.
Important Issues 🟡
Issues that are misleading but have workarounds:
1. Missing
--payload-dirFlag in README Usage SectionLocation: README.md, line 214-226 (Usage section)
Problem: The README's Usage section shows CLI flags but is missing the
--payload-dirflag that actually exists in the codebase.Actual Behavior: The code defines
--payload-dirflag ininternal/cmd/flags_logging.go:Code Reference:
internal/cmd/flags_logging.go:26-27Minor Issues 🔵
Small inconsistencies or missing details:
1. Missing
MCP_GATEWAY_PAYLOAD_DIREnvironment Variable DocumentationLocation: README.md, line 232-263 (Environment Variables section)
Problem: The environment variable
MCP_GATEWAY_PAYLOAD_DIRis not documented in the Environment Variables section, even though it's used in the code.Actual Behavior: The code checks for
MCP_GATEWAY_PAYLOAD_DIRininternal/cmd/flags_logging.go:Impact: Users won't know they can set this environment variable to customize the payload directory location, especially useful in containerized environments.
Suggested Fix: Add to the "Optional (Non-Containerized Mode)" table in the Environment Variables section:
Code Reference:
internal/cmd/flags_logging.go:40-462. Quick Start payload_dir Configuration Not Mentioned
Location: README.md, line 38-51 (Quick Start configuration example)
Problem: The Quick Start configuration example doesn't show the optional
payload_dirfield in the gateway configuration, even though it's supported.Actual Behavior: The code supports
payload_dirin both TOML and JSON configurations:internal/config/config_core.go:PayloadDir stringfield inGatewayConfiginternal/config/config_stdin.go:PayloadDir stringfield inStdinGatewayConfigImpact: Users won't know they can configure the payload directory in their configuration files.
Suggested Fix: Add a note or example showing the
payload_dirfield can be set in gateway configuration. Note:config.example.tomlalready documents this correctly, so this is just about the README examples.Code Reference:
internal/config/config_core.go:56internal/config/config_stdin.go:33Documentation Completeness
Missing Documentation
--payload-dirCLI flag - implemented but missing from Usage sectionMCP_GATEWAY_PAYLOAD_DIRenvironment variable - implemented but not in Environment Variables tableAccurate Sections ✅
The following sections were verified to be accurate and match the implementation:
${VAR_NAME}) - verified accurateTested Commands
All commands from CONTRIBUTING.md were verified against the Makefile:
make build- works as documentedmake test/make test-unit- works as documentedmake test-integration- works as documentedmake test-all- works as documentedmake lint- works as documentedmake coverage- works as documentedmake install- works as documentedmake format- works as documented💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.