Skip to content

Commit c88655f

Browse files
committed
Enhance XML documentation for the .NET Context Server
1 parent a8e517c commit c88655f

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

src/NetContextServer/Program.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
using Microsoft.Extensions.Hosting;
1+
/// <summary>
2+
/// Entry point for the .NET Context Server, which implements a Model Context Protocol (MCP) server
3+
/// for providing codebase context to Large Language Models.
4+
///
5+
/// This server is built using the official C# SDK for MCP (https://github.com/modelcontextprotocol/csharp-sdk)
6+
/// and provides tools for:
7+
/// - File system operations and project discovery
8+
/// - Code search (both text-based and semantic)
9+
/// - Package analysis
10+
/// - Ignore pattern management
11+
/// </summary>
12+
using Microsoft.Extensions.Hosting;
213
using ModelContextProtocol;
314
using System.Reflection;
415

516
// Build and run the MCP server
617
var builder = Host.CreateEmptyApplicationBuilder(settings: null);
718
builder.Services
8-
.AddMcpServer(options =>
19+
.AddMcpServer(options =>
920
{
1021
options.ServerInfo = new() { Name = "NetContextServer", Version = "1.0" };
1122
})

src/NetContextServer/Services/PackageAnalyzerService.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,15 @@ namespace NetContextServer.Services;
1111
/// Provides functionality for analyzing NuGet package references in .NET projects,
1212
/// including version checking, usage analysis, and update recommendations.
1313
/// </summary>
14-
public class PackageAnalyzerService
14+
/// <remarks>
15+
/// Initializes a new instance of the PackageAnalyzerService class.
16+
/// </remarks>
17+
/// <param name="baseDirectory">The base directory for package analysis. If null, uses the current directory.</param>
18+
public class PackageAnalyzerService(string? baseDirectory = null)
1519
{
1620
private static readonly SourceRepository NuGetRepository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json");
1721
private static readonly SourceCacheContext Cache = new();
18-
private readonly string _baseDirectory;
19-
20-
/// <summary>
21-
/// Initializes a new instance of the PackageAnalyzerService class.
22-
/// </summary>
23-
/// <param name="baseDirectory">The base directory for package analysis. If null, uses the current directory.</param>
24-
public PackageAnalyzerService(string? baseDirectory = null)
25-
{
26-
_baseDirectory = baseDirectory ?? Directory.GetCurrentDirectory();
27-
}
22+
private readonly string _baseDirectory = baseDirectory ?? Directory.GetCurrentDirectory();
2823

2924
/// <summary>
3025
/// Gets all package references from a specified project file.

0 commit comments

Comments
 (0)