Convert UIResource documentation to TypeDoc comments
Replace inline comments with comprehensive TypeDoc comments that explain the purpose and usage of each property. Add examples and clarify constraints (MUST/SHOULD) for better developer understanding. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a8107a6733
commit
ae9d87f530
1 changed files with 49 additions and 5 deletions
|
|
@ -53,11 +53,55 @@ UI resources are declared using the standard MCP resource pattern with specific
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface UIResource {
|
interface UIResource {
|
||||||
uri: string; // MUST start with 'ui://'
|
/**
|
||||||
name: string; // Human-readable identifier
|
* Unique identifier for the UI resource
|
||||||
description?: string; // Description of the UI resource
|
*
|
||||||
mimeType: string; // SHOULD be 'text/html+mcp' in MVP
|
* MUST use the `ui://` URI scheme to distinguish UI resources from other
|
||||||
_meta?: UIResourceMeta // Resource Metadata
|
* MCP resource types.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* "ui://weather-dashboard"
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Human-readable display name for the UI resource
|
||||||
|
*
|
||||||
|
* Used for listing and identifying the resource in host interfaces.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* "Weather Dashboard"
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional description of the UI resource's purpose and functionality
|
||||||
|
*
|
||||||
|
* Provides context about what the UI does and when to use it.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* "Interactive weather visualization with real-time updates"
|
||||||
|
*/
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MIME type of the UI content
|
||||||
|
*
|
||||||
|
* SHOULD be `text/html+mcp` for HTML-based UIs in the initial MVP.
|
||||||
|
* Other content types are reserved for future extensions.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* "text/html+mcp"
|
||||||
|
*/
|
||||||
|
mimeType: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resource metadata for security and rendering configuration
|
||||||
|
*
|
||||||
|
* Includes Content Security Policy configuration, dedicated domain settings,
|
||||||
|
* and visual preferences.
|
||||||
|
*/
|
||||||
|
_meta?: UIResourceMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UIResourceMeta {
|
interface UIResourceMeta {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue