Skip to content

Commit 915f281

Browse files
authored
Fix NRT annotation on StdioClientTransportOptions.EnvironmentVariables (#419)
1 parent 2bbfab1 commit 915f281

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/ModelContextProtocol/Client/StdioClientTransportOptions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ public required string Command
4141
/// Gets or sets environment variables to set for the server process.
4242
/// </summary>
4343
/// <remarks>
44+
/// <para>
4445
/// This property allows you to specify environment variables that will be set in the server process's
4546
/// environment. This is useful for passing configuration, authentication information, or runtime flags
4647
/// to the server without modifying its code.
48+
/// </para>
49+
/// <para>
50+
/// By default, when starting the server process, the server process will inherit the current environment's variables,
51+
/// as discovered via <see cref="Environment.GetEnvironmentVariables()"/>. After those variables are found, the entries
52+
/// in this <see cref="EnvironmentVariables"/> dictionary are used to augment and overwrite the entries read from the environment.
53+
/// That includes removing the variables for any of this collection's entries with a null value.
54+
/// </para>
4755
/// </remarks>
48-
public Dictionary<string, string>? EnvironmentVariables { get; set; }
56+
public Dictionary<string, string?>? EnvironmentVariables { get; set; }
4957

5058
/// <summary>
5159
/// Gets or sets the timeout to wait for the server to shut down gracefully.

0 commit comments

Comments
 (0)