Surface skipped conformance scenarios as baselined known failures (#3030)
This commit is contained in:
parent
b15b1d5f07
commit
0b200ef03b
1 changed files with 88 additions and 12 deletions
|
|
@ -11,7 +11,7 @@ import hashlib
|
|||
import hmac
|
||||
import json
|
||||
import logging
|
||||
from typing import Any
|
||||
from typing import Annotated, Any
|
||||
|
||||
import click
|
||||
from mcp.server import ServerRequestContext
|
||||
|
|
@ -327,6 +327,24 @@ def test_error_handling() -> str:
|
|||
raise RuntimeError("This tool intentionally returns an error for testing")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def test_x_mcp_header(
|
||||
region: Annotated[
|
||||
str,
|
||||
Field(
|
||||
description="Mirrored into the Mcp-Param-Region header",
|
||||
json_schema_extra={"x-mcp-header": "Region"},
|
||||
),
|
||||
] = "<none>",
|
||||
) -> str:
|
||||
"""Tests SEP-2243 Mcp-Param-* server-side validation.
|
||||
|
||||
Arms the http-custom-header-server-validation conformance scenario, which
|
||||
skips when no tool with an `x-mcp-header` annotation is found.
|
||||
"""
|
||||
return f"region={region}"
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def test_missing_capability(ctx: Context) -> str:
|
||||
"""Tests that a handler-raised MISSING_REQUIRED_CLIENT_CAPABILITY surfaces as a top-level JSON-RPC error.
|
||||
|
|
|
|||
Loading…
Reference in a new issue