Why Your .NET MCP Tool Classes Crash at Runtime (And the Two-Line Fix) A developer detailed a runtime crash in .NET MCP servers where instance-based tool classes using constructor injection threw a System.Reflection.TargetException because the WithComponentsFrom method registered tool methods but never registered their declaring classes in ASP.NET Core's DI container. The fix, shipped in DotnetFastMCP v2.1, automatically registers every non-static tool class via TryAddTransient and adds parameter descriptions to the JSON Schema so AI models call tools correctly on the first attempt. If you're building MCP servers in .NET with instance-based tool classes — the kind that take ILogger