Skip to content

Commit cfa89a3

Browse files
Copilotstephentoub
andauthored
Clarify McpMetaAttribute documentation scope (#1242)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent d5c6b0d commit cfa89a3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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)