Remove environment ID parameter and usage in APIs#33
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the environmentId parameter from MCP tool server configuration across the codebase. The changes simplify the MCP server URL structure by removing environment-specific routing and using a flat server naming approach instead.
Key changes:
- Removed
environmentIdparameter from all tool registration service methods - Simplified
BuildMcpServerUrlto only require server name - Removed
GetUseEnvironmentIdutility function and related conditional logic - Updated documentation and examples to reflect the new simplified API
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/agents-a365-tooling/src/Utility.ts | Removed GetUseEnvironmentId() method and simplified BuildMcpServerUrl() to only accept server name parameter |
| packages/agents-a365-tooling/src/McpToolServerConfigurationService.ts | Removed environmentId parameter from listToolServers() and related methods; removed x-ms-environment-id header |
| packages/agents-a365-tooling-extensions-openai/src/McpToolRegistrationService.ts | Removed environmentId parameter from addMcpToolServers() and removed environment ID header logic |
| packages/agents-a365-tooling-extensions-langchain/src/McpToolRegistrationService.ts | Removed environmentId parameter from addMcpToolServers() and removed environment ID header logic |
| packages/agents-a365-tooling-extensions-claude/src/McpToolRegistrationService.ts | Removed environmentId parameter from addToolServers() and removed environment ID header logic |
| tests-agent/openai-agent-auto-instrument-sample/src/OpenAIClient.ts | Removed environmentId argument from tool service method calls |
| tests-agent/openai-agent-auto-instrument-sample/src/LocalMcpToolRegistrationService.ts | Removed environmentId parameter and field from interface and method signatures |
| tests-agent/openai-agent-auto-instrument-sample/.env.example | Removed MCP_ENVIRONMENT_ID environment variable |
| packages/agents-a365-tooling/README.md | Updated documentation to remove environment ID references |
| packages/agents-a365-tooling-extensions-openai/README.md | Updated documentation and examples to remove environment ID usage |
| packages/agents-a365-tooling-extensions-langchain/README.md | Updated documentation and examples to remove environment ID usage |
| packages/agents-a365-tooling-extensions-claude/README.md | Updated documentation and examples to remove environment ID usage |
| tests-agent/openai-agent-auto-instrument-sample/README.md | Updated documentation to remove environment ID references |
Comments suppressed due to low confidence (2)
packages/agents-a365-tooling/src/Utility.ts:1
- This file is missing the Microsoft copyright header. Add the following at the top of the file:\n
typescript\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n
export enum ToolsMode {
packages/agents-a365-tooling/src/McpToolServerConfigurationService.ts:1
- This file is missing the Microsoft copyright header. Add the following at the top of the file:\n
typescript\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n
import fs from 'fs';
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/agents-a365-tooling/src/McpToolServerConfigurationService.ts:32
- The JSDoc comment references the old method signature. Update the comment to reflect that
BuildMcpServerUrlnow only requiresserverNameparameter (no longer requiresenvironmentId).
* Query the tooling gateway for MCP servers for the specified agent and normalize each entry's mcpServerUniqueName into a full URL using Utility.BuildMcpServerUrl.
pontemonti
approved these changes
Nov 12, 2025
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.
Removing environment ID from all calls as it's no longer needed in calls to MCP platform.
This is a breaking change as we are changing public API signatures to remove the parameter.