Remove unused block parameters
There are some unused block variables. This change removes block parameters that consist solely of unused block parameters. Where `Hash#values` suffices instead of ignoring unused variables, replace such code with `Hash#values`.
This commit is contained in:
parent
a17b23e1a4
commit
0c8937de34
4 changed files with 7 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue