add title field to prompt argument

`PromptArgument extends BaseMetadata`, which includes both name and
title
 - 51e093b8eb/schema/2025-06-18/schema.ts (L686-L698)
 - 51e093b8eb/schema/2025-06-18/schema.ts (L294-l309)
This commit is contained in:
Topher Bullock 2025-10-06 09:35:42 -04:00
commit 701f6faab6

View file

@ -113,7 +113,12 @@ module MCP
title: "Mock Prompt",
description: "a mock prompt for testing",
arguments: [
Prompt::Argument.new(name: "test_argument", description: "Test argument", required: true),
Prompt::Argument.new(
name: "test_argument",
title: "Test argument title",
description: "This is a test argument description",
required: true,
),
],
) do |args, server_context:|
content = Content::Text.new(args["test_argument"] + " user: #{server_context[:user_id]}")