Skip to main content
The generator reports diagnostics at build time for invalid MCP server declarations.

Rules

Examples

QA0001 — Class must be partial

QA0004 — Orphaned tool

QA0009 — Missing description

Add [Description] to suppress:

QA0012 — All safety hints Unset

Only fires when all four hints are explicitly set to ToolHint.Unset:

QA0013 — Resource invalid return type

[Resource] methods must return string, Task<string>, or ValueTask<string>.

QA0014 — Duplicate resource URI

Two methods in the same server cannot share a [Resource] URI.

QA0015 — Prompt invalid return type

[Prompt] methods must return string, Task<string>, PromptResult, or Task<PromptResult>.

QA0016 — Duplicate prompt name

Two methods in the same server cannot share a [Prompt] name.

Configuration