3using System.Threading.Tasks;
14 private readonly Func<Task<object?>> read;
29 Func<Task<object?>>
Read, params KeyValuePair<string, object>[]
MetaData)
52 params KeyValuePair<string, object>[]
MetaData)
78 params KeyValuePair<string, object>[]
MetaData)
173 params KeyValuePair<string, object>[]
MetaData)
185 public override async Task<IResourceContent[]>
Read(
186 Dictionary<string, object>?
MetaData)
188 object? Result = await this.read();
Helps with common TOON-related tasks.
static string Encode(object Object, bool Indent)
Encodes an object as TOON.
const string DefaultContentType
text/toon
DateTime? LastModified
The moment the resource was last modified, as an ISO 8601 formatted string.
double? Priority
Describes how important this data is for operating the server.
McpRole?[] Audience
Describes who the intended audience of this object or data is.
An optionally-sized icon that can be displayed in a user interface.
Base interface to add icons property.
Contains information about an MCP Server JSON Resource
override async Task< IResourceContent[]> Read(Dictionary< string, object >? MetaData)
Reads the resource.
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, string? RequiredPrivilege, long? Size, Icons? Icons, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Server JSON Resource
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, string? RequiredPrivilege, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Text Server Resource
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Text Server Resource
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, string? RequiredPrivilege, long? Size, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Server JSON Resource
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, string? RequiredPrivilege, long? Size, Icon Icon, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Server JSON Resource
ToonResource(string Name, string Title, string Description, Uri Uri, Func< Task< object?> > Read, string? RequiredPrivilege, long? Size, Icons? Icons, McpRole[]? Audience, double? Priority, DateTime? LastModified, params KeyValuePair< string, object >[] MetaData)
Contains information about an MCP Server JSON Resource
Contains information about an MCP Server Resource
Uri Uri
URI of the resource.
string Title
A human-readable title for the prompt.
string Name
Name of resource.
KeyValuePair< string, object >[] MetaData
Meta-data associated with prompt.
string? RequiredPrivilege
Privilege required to access the resource, if any. If null, no additional privilege is required.
long? Size
The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization),...
string Description
A human-readable description of the prompt.
Interface for MCP Resource Content.
McpRole
Identifies a Role in a Model Context Protocol (MCP) context.