Skip to content

Commit 2daab41

Browse files
committed
refactor: rename McpServerTool names to use snake_case format
1 parent 08b265d commit 2daab41

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/ProjGraph.Mcp/Program.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,8 @@
1515

1616
namespace ProjGraph.Mcp;
1717

18-
/// <summary>
19-
/// Entry point for the Model Context Protocol (MCP) server for ProjGraph.
20-
/// </summary>
2118
internal static class Program
2219
{
23-
/// <summary>
24-
/// Starts the MCP server on stdio.
25-
/// </summary>
26-
/// <param name="args">Command-line arguments.</param>
2720
public static async Task Main(string[] args)
2821
{
2922
var version = typeof(Program).Assembly
@@ -63,7 +56,7 @@ internal sealed class ProjGraphTools(
6356
IDiagramRenderer<ClassModel> classRenderer,
6457
IDiagramRenderer<EfModel> erdRenderer)
6558
{
66-
[McpServerTool(Name = "GetClassDiagram")]
59+
[McpServerTool(Name = "get_class_diagram")]
6760
[Description(
6861
"Generates a Mermaid class diagram for the types defined in a specific C# file, with options to discover inheritance and related types in the workspace.")]
6962
public async Task<string> GetClassDiagramAsync(
@@ -90,7 +83,7 @@ public async Task<string> GetClassDiagramAsync(
9083
return classRenderer.Render(model, new DiagramOptions(showTitle));
9184
}
9285

93-
[McpServerTool(Name = "GetProjectGraph")]
86+
[McpServerTool(Name = "get_project_graph")]
9487
[Description("Analyzes a .NET solution or project file and returns the dependency graph as a Mermaid diagram.")]
9588
public Task<string> GetProjectGraphAsync(
9689
[Description("Absolute path to the project or solution file.")]
@@ -119,7 +112,7 @@ public Task<string> GetProjectGraphAsync(
119112
return Task.FromResult(graphRenderer.Render(graph, new DiagramOptions(showTitle)));
120113
}
121114

122-
[McpServerTool(Name = "GetErd")]
115+
[McpServerTool(Name = "get_erd")]
123116
[Description(
124117
"Generates a Mermaid Entity Relationship Diagram (ERD) from an Entity Framework Core DbContext or ModelSnapshot file, including entities, properties, relationships, constraints, and inherited properties from base classes.")]
125118
public async Task<string> GetErdAsync(

0 commit comments

Comments
 (0)