feat: add theme field to Icon type for light/dark mode support (#1978)
This commit is contained in:
parent
6f8b791faf
commit
71e78842cc
2 changed files with 13 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ from mcp.types._types import (
|
||||||
GetTaskRequestParams,
|
GetTaskRequestParams,
|
||||||
GetTaskResult,
|
GetTaskResult,
|
||||||
Icon,
|
Icon,
|
||||||
|
IconTheme,
|
||||||
ImageContent,
|
ImageContent,
|
||||||
Implementation,
|
Implementation,
|
||||||
IncludeContext,
|
IncludeContext,
|
||||||
|
|
@ -275,6 +276,7 @@ __all__ = [
|
||||||
"BlobResourceContents",
|
"BlobResourceContents",
|
||||||
"EmbeddedResource",
|
"EmbeddedResource",
|
||||||
"Icon",
|
"Icon",
|
||||||
|
"IconTheme",
|
||||||
"ImageContent",
|
"ImageContent",
|
||||||
"ResourceContents",
|
"ResourceContents",
|
||||||
"ResourceLink",
|
"ResourceLink",
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#protoc
|
||||||
ProgressToken = str | int
|
ProgressToken = str | int
|
||||||
Role = Literal["user", "assistant"]
|
Role = Literal["user", "assistant"]
|
||||||
|
|
||||||
|
IconTheme = Literal["light", "dark"]
|
||||||
|
|
||||||
TaskExecutionMode = Literal["forbidden", "optional", "required"]
|
TaskExecutionMode = Literal["forbidden", "optional", "required"]
|
||||||
TASK_FORBIDDEN: Final[Literal["forbidden"]] = "forbidden"
|
TASK_FORBIDDEN: Final[Literal["forbidden"]] = "forbidden"
|
||||||
TASK_OPTIONAL: Final[Literal["optional"]] = "optional"
|
TASK_OPTIONAL: Final[Literal["optional"]] = "optional"
|
||||||
|
|
@ -170,6 +172,15 @@ class Icon(MCPModel):
|
||||||
sizes: list[str] | None = None
|
sizes: list[str] | None = None
|
||||||
"""Optional list of strings specifying icon dimensions (e.g., ["48x48", "96x96"])."""
|
"""Optional list of strings specifying icon dimensions (e.g., ["48x48", "96x96"])."""
|
||||||
|
|
||||||
|
theme: IconTheme | None = None
|
||||||
|
"""Optional theme specifier.
|
||||||
|
|
||||||
|
`"light"` indicates the icon is designed for a light background, `"dark"` indicates the icon
|
||||||
|
is designed for a dark background.
|
||||||
|
|
||||||
|
See https://modelcontextprotocol.io/specification/2025-11-25/schema#icon for more details.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Implementation(BaseMetadata):
|
class Implementation(BaseMetadata):
|
||||||
"""Describes the name and version of an MCP implementation."""
|
"""Describes the name and version of an MCP implementation."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue