Merged
Conversation
- Introduced a new test file `progToolCall.js` containing various tests for the ProgToolCall server functionality, including server start/stop, token rejection, tool listing, and more. - Created a corresponding YAML configuration file `progToolCall.yaml` to define the test jobs and their execution order. - Updated `autoTestAll.allJobs.yaml` to include the new `progToolCall.yaml` for comprehensive testing.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces a programmatic MCP tool calling feature via a per-session localhost HTTP bridge (mcpprogcall), enabling LLM-generated scripts to list, search, and call MCP tools through REST endpoints. The feature includes comprehensive configuration options, thorough documentation, and extensive test coverage. Additionally, the PR includes several unrelated improvements to context management and summarization that are not mentioned in the PR description.
Changes:
- Added
MiniAProgCallServerclass implementing a per-session HTTP bridge for programmatic tool calls with REST endpoints, token authentication, result storage, and automatic cleanup - Added
__miniABuildCompactToolManifestutility function for building proxy-aware tool manifests - Improved context deduplication with budget-based filtering and fingerprinting
- Implemented chunked summarization to handle large contexts that exceed LLM limits
- Added detection of context-window overflow errors from LLM response payloads
- Updated documentation across README.md, USAGE.md, and CHEATSHEET.md
- Added comprehensive test suite (20 test cases) covering server lifecycle, authentication, endpoints, and edge cases
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mini-a-progcall.js | New HTTP bridge server implementation with routes, authentication, result storage, and prompt generation |
| mini-a-common.js | Added __miniABuildCompactToolManifest utility for building compact tool manifests with proxy awareness |
| mini-a.js | Integrated progcall server lifecycle, environment variable injection, shutdown hooks, improved context deduplication, chunked summarization, and payload error detection |
| mini-a-con.js | Added CLI parameter definitions for mcpprogcall feature configuration |
| tests/progToolCall.js | Comprehensive test suite with 20 test cases covering all bridge functionality |
| tests/progToolCall.yaml | oJob test orchestration for programmatic tool calling tests |
| tests/autoTestAll.allJobs.yaml | Included new test suite in test runner |
| README.md | Documented programmatic tool calling feature and configuration parameters |
| USAGE.md | Added detailed usage guide with examples and endpoint documentation |
| CHEATSHEET.md | Added quick reference for mcpprogcall parameters and usage |
| .package.yaml | Added new files to package manifest and removed unused precompiled files |
💡 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.
This pull request introduces a new feature for programmatic MCP tool calling by adding an optional per-session localhost HTTP bridge (
mcpprogcall). This allows scripts executed by the agent to list, search, and call MCP tools via REST endpoints, improving automation and integration capabilities. The feature is configurable with several new parameters for security, performance, and result management. Documentation and supporting files have been updated to describe and support this new bridge, and new tests have been added.New Programmatic Tool Calling Bridge:
mcpprogcalloption and related configuration parameters (mcpprogcallport,mcpprogcallmaxbytes,mcpprogcallresultttl,mcpprogcalltools,mcpprogcallbatchmax) to enable a per-session localhost HTTP bridge for programmatic tool calls from scripts. This includes environment variable injection and REST endpoints for tool listing, searching, calling, batch calls, and result retrieval. (mini-a-con.js,mini-a-common.js,mini-a-progcall.js,README.md,USAGE.md,CHEATSHEET.md) [1] [2] [3] [4] [5] [6] [7] [8]Documentation Updates:
README.md,USAGE.md, andCHEATSHEET.mdto describe the new programmatic bridge, its configuration, usage examples, and available endpoints. [1] [2] [3] [4] [5] [6] [7]Supporting Code and Utilities:
mini-a-progcall.jsas the implementation for the HTTP bridge. [1] [2]__miniABuildCompactToolManifestto build tool manifests for API responses, supporting both proxy and non-proxy modes. (mini-a-common.js)Testing:
tests/progToolCall.jsandtests/progToolCall.yaml. [1] [2]Housekeeping:
.package.yaml) [1] [2]Others:
Context deduplication improvements: A rewritten _deduplicateContext method with budget-based filtering, fingerprinting, and support for observation class budgets.
Chunked summarization: A new approach that splits large contexts into chunks before summarization to handle payloads that exceed LLM context windows.
Context overflow detection from response payload: Added detection of context-window overflow errors that appear in the LLM's response payload itself (not just from provider errors).
These changes collectively provide a robust, script-friendly interface for MCP tool automation, with clear documentation and tests to support adoption.