A testing framework that creates an in-memory MCP server and a connected client for integration testing, similar in spirit to WebApplicationFactory<T>
This MCP server implements 5 test tools with basic-to-moderate quality. Tool names are reasonably clear action verbs (echo, greet, ask, point), but descriptions vary in completeness. Most parameters have type declarations and brief descriptions, but several lack sufficient detail for LLM-driven selection. Output schemas are partially visible (e.g., PointDto for 'point'), but many are inferred rather than explicitly documented. Error handling is present (boom tool demonstrates exception handling) but lacks recovery guidance. The codebase shows test-focused design (McpServerFactory for integration testing) rather than production-grade tool engineering. STDIO-only transport caps Protocol Readiness at 50, but Definition Quality stands alone at 52 due to moderate schema gaps and minimal error guidance.
Sends a question to the client via server-initiated sampling (LLM request) and returns the assistant's response
Throws an InvalidOperationException with message 'boom failed'
Echoes back the provided message string
Returns a greeting message from an injected message provider
Returns a structured point object with x and y coordinates
Tool 'greet' has no input parameters documented. Description 'Returns a greeting message from an injected message provider' does not explain WHEN to call it vs other tools, what makes it different, or what context it requires. LLMs cannot determine tool selection without distinguishing criteria.
Tool 'ask' relies on server-initiated Sampling (CreateMessageRequestParams, SampleAsync). This pattern is deprecated as of 2026-07-28. Sampling should be integrated directly with the LLM provider API, not invoked server-side. This creates a stateful interaction that violates the current stateless MCP protocol design.
No tool descriptions explain error handling, recovery steps, or prerequisites. 'boom' throws InvalidOperationException('boom failed') but the tool description does not indicate this is intentional error-testing behavior. LLMs will not know whether to retry, ask the user, or abandon the task.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2025-06-18+ | v2 |
| 2026-03-09 | F | 31 | - | v1 |
Tool 'greet' has an output return type (string from IMessageProvider.GetMessage()), but no output schema is documented in the tool definition. LLMs cannot plan downstream operations or validate the response structure.
Parameter descriptions are generic and lack constraints. 'The message to echo' (echo tool) does not specify length limits, encoding requirements, or format constraints. 'The question to ask the LLM' (ask tool) omits token limits, language requirements, or topic restrictions. LLMs will pass unbounded input.
Tool 'point' description 'Returns a structured point object with x and y coordinates' does not specify the valid range for x and y (e.g., are they unbounded integers? Non-negative? Floating-point?). Coordinate semantics (Cartesian? Geographic latitude/longitude?) are undefined.
No tool declares its idempotency. All tools are marked READ_ONLY, but 'ask' has side effects (sends messages to the client). The enum of side-effect intentions (safe to retry vs irreversible) is missing from all tool descriptions.