Skip to content

Remove environment ID parameter and usage in APIs#33

Merged
joratz merged 4 commits into
mainfrom
users/joratz/removeenvid
Nov 12, 2025
Merged

Remove environment ID parameter and usage in APIs#33
joratz merged 4 commits into
mainfrom
users/joratz/removeenvid

Conversation

@joratz

@joratz joratz commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings November 6, 2025 06:15
@joratz
joratz requested a review from a team as a code owner November 6, 2025 06:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 environmentId parameter from all tool registration service methods
  • Simplified BuildMcpServerUrl to only require server name
  • Removed GetUseEnvironmentId utility 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:\ntypescript\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:\ntypescript\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n
import fs from 'fs';

Comment thread packages/agents-a365-tooling/src/Utility.ts
Copilot AI review requested due to automatic review settings November 6, 2025 06:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BuildMcpServerUrl now only requires serverName parameter (no longer requires environmentId).
   * Query the tooling gateway for MCP servers for the specified agent and normalize each entry's mcpServerUniqueName into a full URL using Utility.BuildMcpServerUrl.

Comment thread packages/agents-a365-tooling-extensions-claude/src/McpToolRegistrationService.ts Outdated
@joratz
joratz merged commit a613a9c into main Nov 12, 2025
7 checks passed
@pontemonti
pontemonti deleted the users/joratz/removeenvid branch December 5, 2025 17:09
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.

3 participants