Update content according to latest spec (#513)
* Update content according to latest spec * Add Title to a bunch of types * Add _meta to lots of types * Address feedback, more cleanup, fix NAOT test failure
This commit is contained in:
parent
28d65470f4
commit
2bcff315f8
1 changed files with 1700 additions and 853 deletions
25
src/ModelContextProtocol.Core/Protocol/IBaseMetadata.cs
Normal file
25
src/ModelContextProtocol.Core/Protocol/IBaseMetadata.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
||||
/// <summary>Provides a base interface for metadata with name (identifier) and title (display name) properties.</summary>
|
||||
public interface IBaseMetadata
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier for this item.
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a title.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is intended for UI and end-user contexts. It is optimized to be human-readable and easily understood,
|
||||
/// even by those unfamiliar with domain-specific terminology.
|
||||
/// If not provided, <see cref="Name"/> may be used for display (except for tools, where <see cref="ToolAnnotations.Title"/>, if present,
|
||||
/// should be given precedence over using <see cref="Name"/>).
|
||||
/// </remarks>
|
||||
[JsonPropertyName("title")]
|
||||
string? Title { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue