Draft
Conversation
104203d to
56a6372
Compare
56a6372 to
4269638
Compare
BenjaminMichaelis
added a commit
that referenced
this pull request
Apr 25, 2026
- BookSearchTool: collapse else-if(!semanticAvailable)+else into single else with ternary to remove constant-condition CodeQL finding - BookGuidelinesTool: use pattern match (is int / is GuidelineType) to extract nullable locals before lambda capture, removing nullable dereference warnings at lines 38 and 41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BenjaminMichaelis
added a commit
that referenced
this pull request
Apr 26, 2026
…elect - Remove GetBookMetadata() MCP tool and trim BookMetadata class to SiteUrl only - Fix PR #876 feedback: refactor foreach+clone into codeLines.Select(line => line.CloneNode(deep:true)) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add McpTokenService with JWT token generation/validation - Add McpTokenController for token management UI - Add MCP Access page to account management - Configure MCP server with BookSearchTool - Update ModelContextProtocol packages to 0.9.0-preview.2 - Add Microsoft.AspNetCore.Authentication.JwtBearer - Fix MCP client API: use concrete McpClient type - Add toolCallDepth guard to prevent infinite recursion Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add IGuidelinesService + GuidelinesService (singleton) for guidelines.json - Add BookListingTool: GetListingSourceCode, SearchListingsByCode - Add BookGuidelinesTool: GetCSharpGuidelines, GetGuidelinesByTopic - Add BookContentTool: GetSectionContent, GetListingWithContext, GetNavigationContext, GetChapterSummary - Extend BookSearchTool: GetChapterSections, GetDirectContentUrl, GetBookMetadata, LookupConcept, CheckTopicCoverage, FindBookHelpForDiagnostic, FindRelatedSections - Register all new tools in Program.cs MCP block Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove Destructive = false from all 17 MCP tool annotations (default per spec) - Fix FindBookHelpForDiagnostic description to accurately reflect guidelines output - Add 500-char max length validation to SearchBookContent, LookupConcept, CheckTopicCoverage, FindBookHelpForDiagnostic - Add missing empty check to SearchBookContent - Make GetSectionContent async (File.ReadAllTextAsync + doc.LoadHtml, removes TOCTOU File.Exists) - Add path canonicalization via Path.GetRelativePath (robust cross-platform, handles drive-root edge case) - Add .html file extension allowlist check on resolved path - Add AnchorId validation via [GeneratedRegex] before XPath interpolation - Separate IOException catches: FileNotFoundException/DirectoryNotFoundException show 'not generated yet', UnauthorizedAccessException and IOException show generic messages (no ex.Message leak) - Make BookContentTool a partial class for GeneratedRegex support Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The MCP spec (and C# SDK) default destructiveHint to true. Explicitly setting Destructive = false is required so clients know these read-only book search tools are non-destructive. Note: per spec, destructiveHint is 'only meaningful when readOnlyHint == false', but the SDK still emits the value on the wire so explicit false is the safe, correct choice. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- BookSearchTool: collapse else-if(!semanticAvailable)+else into single else with ternary to remove constant-condition CodeQL finding - BookGuidelinesTool: use pattern match (is int / is GuidelineType) to extract nullable locals before lambda capture, removing nullable dereference warnings at lines 38 and 41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…all sites The helper class only had one method (NormalizeExtension) used in 3 places. The VB.NET/F# cases were dead code — all 1,396 real book listings are .cs. Simplified to a ternary inline at each call site; non-cs extensions pass through unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…elect - Remove GetBookMetadata() MCP tool and trim BookMetadata class to SiteUrl only - Fix PR #876 feedback: refactor foreach+clone into codeLines.Select(line => line.CloneNode(deep:true)) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ea81960 to
2d5678f
Compare
…h tools - AISearchService.ExecuteVectorSearch gains optional top param (default 5, clamped to 1-10) - SearchBookContent, LookupConcept, FindRelatedSections expose maxResults to MCP clients - Raises default from 3→5 for better coverage of broad C# concepts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #761