Skip to content

Commit 2bfeeaa

Browse files
committed
remove invalid xrefs
1 parent 41b5fac commit 2bfeeaa

6 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/concepts/cancellation/cancellation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static async Task<string> LongComputation(
3535
}
3636
```
3737

38-
When the client sends a cancellation notification, the <xref:System.OperationCanceledException> propagates back to the client as a cancellation response.
38+
When the client sends a cancellation notification, the `OperationCanceledException` propagates back to the client as a cancellation response.
3939

4040
### Cancellation notification details
4141

docs/concepts/completions/completions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ builder.Services.AddMcpServer()
8383

8484
### Automatic completions with AllowedValuesAttribute
8585

86-
For parameters with a known set of valid values, you can use <xref:System.ComponentModel.DataAnnotations.AllowedValuesAttribute> on `string` parameters of prompts or resource templates. The server will automatically surface those values as completions without needing a custom completion handler.
86+
For parameters with a known set of valid values, you can use `AllowedValuesAttribute` on `string` parameters of prompts or resource templates. The server will automatically surface those values as completions without needing a custom completion handler.
8787

8888
#### Prompt parameters
8989

docs/concepts/httpcontext/httpcontext.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ uid: httpcontext
1010
When using the Streamable HTTP transport, an MCP server might need to access the underlying <xref:Microsoft.AspNetCore.Http.HttpContext> for a request.
1111
The <xref:Microsoft.AspNetCore.Http.HttpContext> object contains request metadata such as the HTTP headers, authorization context, and the actual path and query string for the request.
1212

13-
To access the <xref:Microsoft.AspNetCore.Http.HttpContext>, the MCP server should add the <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> service to the application service collection (typically in Program.cs).
14-
Then any classes, for example, a class containing MCP tools, should accept an <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> in their constructor and store this for use by its methods.
15-
Methods then use the <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor.HttpContext> property of the accessor to get the current context.
13+
To access the <xref:Microsoft.AspNetCore.Http.HttpContext>, the MCP server should add the `IHttpContextAccessor` service to the application service collection (typically in Program.cs).
14+
Then any classes, for example, a class containing MCP tools, should accept an `IHttpContextAccessor` in their constructor and store this for use by its methods.
15+
Methods then use the `HttpContext` property of the accessor to get the current context.
1616

17-
The following code snippet illustrates how to add the <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> service to the application service collection:
17+
The following code snippet illustrates how to add the `IHttpContextAccessor` service to the application service collection:
1818

1919
[!code-csharp[](samples/Program.cs?name=snippet_AddHttpContextAccessor)]
2020

21-
Any class that needs access to the <xref:Microsoft.AspNetCore.Http.HttpContext> can accept an <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> in its constructor and store it for later use.
21+
Any class that needs access to the <xref:Microsoft.AspNetCore.Http.HttpContext> can accept an `IHttpContextAccessor` in its constructor and store it for later use.
2222
Methods of the class can then access the current <xref:Microsoft.AspNetCore.Http.HttpContext> using the stored accessor.
2323

24-
The following code snippet shows the `ContextTools` class accepting an <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> in its primary constructor
24+
The following code snippet shows the `ContextTools` class accepting an `IHttpContextAccessor` in its primary constructor
2525
and the `GetHttpHeaders` method accessing the current <xref:Microsoft.AspNetCore.Http.HttpContext> to retrieve the HTTP headers from the current request.
2626

2727
[!code-csharp[](samples/Tools/ContextTools.cs?name=snippet_AccessHttpContext)]

docs/concepts/progress/progress.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ await using var handler = mcpClient.RegisterNotificationHandler(NotificationMeth
5050
});
5151
```
5252

53-
The second way is to pass a [`Progress<T>`](https://learn.microsoft.com/dotnet/api/system.progress-1) instance to the tool method. <xref:System.Progress%601> is a standard .NET type that provides a way to receive progress updates.
53+
The second way is to pass a [`Progress<T>`](https://learn.microsoft.com/dotnet/api/system.progress-1) instance to the tool method. `Progress\<T>` is a standard .NET type that provides a way to receive progress updates.
5454
For the purposes of MCP progress notifications, `T` should be <xref:ModelContextProtocol.ProgressNotificationValue>.
55-
The MCP C# SDK will automatically handle progress notifications and report them through the <xref:System.Progress%601> instance.
55+
The MCP C# SDK will automatically handle progress notifications and report them through the `Progress\<T>` instance.
5656
This notification handler will only receive progress updates for the specific request that was made,
5757
rather than all progress notifications from the server.
5858

docs/concepts/tools/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Tool errors in MCP are distinct from protocol errors. When a tool encounters an
208208
When a tool method throws an exception, the server catches it and returns a <xref:ModelContextProtocol.Protocol.CallToolResult> with `IsError = true`, with the following exceptions:
209209

210210
- <xref:ModelContextProtocol.McpProtocolException> is rethrown as a JSON-RPC error response (not a tool error result).
211-
- <xref:System.OperationCanceledException> is rethrown when the cancellation token was triggered.
211+
- `OperationCanceledException` is rethrown when the cancellation token was triggered.
212212

213213
For all other exceptions, the error is returned as a tool result. If the exception derives from <xref:ModelContextProtocol.McpException> (excluding <xref:ModelContextProtocol.McpProtocolException>, which is rethrown above), its message is included in the error text; otherwise, a generic message is returned to avoid leaking internal details.
214214

docs/experimental.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ Experimental properties on protocol types are fully serialized and deserialized
3939

4040
The behavior of experimental properties differs depending on whether you use [reflection-based or source-generated](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/source-generation) serialization:
4141

42-
- **Reflection-based serialization** (the default when no <xref:System.Text.Json.Serialization.JsonSerializerContext> is used): Experimental properties are included. No special configuration is needed.
43-
- **Source-generated serialization** (using a custom <xref:System.Text.Json.Serialization.JsonSerializerContext>): Experimental properties are **not** included in your context's serialization contract. This is by design, as it protects your compiled code against binary breaking changes to experimental APIs.
42+
- **Reflection-based serialization** (the default when no `JsonSerializerContext` is used): Experimental properties are included. No special configuration is needed.
43+
- **Source-generated serialization** (using a custom `JsonSerializerContext`): Experimental properties are **not** included in your context's serialization contract. This is by design, as it protects your compiled code against binary breaking changes to experimental APIs.
4444

4545
This means that switching between reflection-based and source-generated serialization can silently change which properties are serialized. To avoid this, source-generation users should configure a `TypeInfoResolverChain` as described below.
4646

47-
### Custom `JsonSerializerContext`
47+
### Custom JsonSerializerContext
4848

49-
If you define your own <xref:System.Text.Json.Serialization.JsonSerializerContext> that includes MCP protocol types, configure a `TypeInfoResolverChain` so the SDK's resolver handles MCP types:
49+
If you define your own `JsonSerializerContext` that includes MCP protocol types, configure a `TypeInfoResolverChain` so the SDK's resolver handles MCP types:
5050

5151
```csharp
5252
using ModelContextProtocol;

0 commit comments

Comments
 (0)