Skip to content

Commit 1482261

Browse files
Copilotstephentoub
andcommitted
Clarify McpMetaAttribute documentation to explain scope of metadata application
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 38218c7 commit 1482261

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/ModelContextProtocol.Core/Server/McpMetaAttribute.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ namespace ModelContextProtocol.Server;
1111
/// <remarks>
1212
/// <para>
1313
/// The metadata is used to populate the <see cref="Tool.Meta"/>, <see cref="Prompt.Meta"/>,
14-
/// or <see cref="Resource.Meta"/> property of the corresponding primitive.
14+
/// or <see cref="Resource.Meta"/> property of the corresponding primitive. This metadata is
15+
/// included in the responses to listing operations (<c>tools/list</c>, <c>prompts/list</c>,
16+
/// <c>resources/list</c>).
17+
/// </para>
18+
/// <para>
19+
/// This metadata is <b>not</b> propagated to the results of invocation operations such as
20+
/// <c>tools/call</c>, <c>prompts/get</c>, or <c>resources/read</c>. To include metadata in
21+
/// those results, set the <c>Meta</c> property on the <see cref="CallToolResult"/>,
22+
/// <see cref="GetPromptResult"/>, or <see cref="ReadResourceResult"/> directly in your method implementation.
1523
/// </para>
1624
/// <para>
1725
/// This attribute can be applied multiple times to a method to specify multiple key/value pairs

0 commit comments

Comments
 (0)