Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static IMcpServerBuilder WithPrompts(this IMcpServerBuilder builder, para
}

/// <summary>
/// Adds types marked with the <see cref="McpServerToolTypeAttribute"/> attribute from the given assembly as prompts to the server.
/// Adds types marked with the <see cref="McpServerPromptTypeAttribute"/> attribute from the given assembly as prompts to the server.
/// </summary>
/// <param name="builder">The builder instance.</param>
/// <param name="promptAssembly">The assembly to load the types from. Null to get the current assembly</param>
Expand All @@ -190,7 +190,7 @@ public static IMcpServerBuilder WithPromptsFromAssembly(this IMcpServerBuilder b

return builder.WithPrompts(
from t in promptAssembly.GetTypes()
where t.GetCustomAttribute<McpServerToolTypeAttribute>() is not null
where t.GetCustomAttribute<McpServerPromptTypeAttribute>() is not null
select t);
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void Register_Prompts_From_Multiple_Sources()
Assert.Contains(services.GetServices<McpServerPrompt>(), t => t.ProtocolPrompt.Name == nameof(MorePrompts.AnotherPrompt));
}

[McpServerToolType]
[McpServerPromptType]
public sealed class SimplePrompts(ObjectWithId? id = null)
{
[McpServerPrompt, Description("Returns chat messages")]
Expand Down