Merge pull request #139 from koic/remove_useless_block_argument

Remove unused block parameters
This commit is contained in:
Koichi ITO 2025-09-21 13:09:20 +09:00 • committed by GitHub
commit e168292876
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View file

@ -253,7 +253,7 @@ module MCP
end
def list_tools(request)
@tools.map { |_, tool| tool.to_h }
@tools.values.map(&:to_h)
end
def call_tool(request)
@ -293,7 +293,7 @@ module MCP
end
def list_prompts(request)
@prompts.map { |_, prompt| prompt.to_h }
@prompts.values.map(&:to_h)
end
def get_prompt(request)

View file

@ -210,7 +210,7 @@ module MCP
@server.define_prompt(
name: "test_prompt",
description: "Test prompt",
) do |_args, _server_context:|
) do
MCP::PromptResponse.new(messages: [{ role: "user", content: "Test" }])
end

View file

@ -37,7 +37,7 @@ module MCP
arguments: [
Prompt::Argument.new(name: "test_argument", description: "Test argument", required: true),
],
) do |_|
) do
Prompt::Result.new(
description: "Hello, world!",
messages: [

View file

@ -123,7 +123,7 @@ module MCP
name: "mock_tool",
title: "Mock Tool",
description: "a mock tool for testing",
) do |_|
) do
Tool::Response.new([{ type: "text", content: "OK" }])
end
@ -141,7 +141,7 @@ module MCP
read_only_hint: true,
title: "Mock Tool",
},
) do |_|
) do
Tool::Response.new([{ type: "text", content: "OK" }])
end
@ -347,7 +347,7 @@ module MCP
title: "Mock Tool",
description: "a mock tool for testing",
output_schema: { properties: { result: { type: "string" } }, required: ["result"] },
) do |_|
) do
Tool::Response.new([{ type: "text", content: "OK" }])
end