Merge pull request #139 from koic/remove_useless_block_argument
Remove unused block parameters
This commit is contained in:
commit
e168292876
4 changed files with 7 additions and 7 deletions
|
|
@ -253,7 +253,7 @@ module MCP
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_tools(request)
|
def list_tools(request)
|
||||||
@tools.map { |_, tool| tool.to_h }
|
@tools.values.map(&:to_h)
|
||||||
end
|
end
|
||||||
|
|
||||||
def call_tool(request)
|
def call_tool(request)
|
||||||
|
|
@ -293,7 +293,7 @@ module MCP
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_prompts(request)
|
def list_prompts(request)
|
||||||
@prompts.map { |_, prompt| prompt.to_h }
|
@prompts.values.map(&:to_h)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_prompt(request)
|
def get_prompt(request)
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ module MCP
|
||||||
@server.define_prompt(
|
@server.define_prompt(
|
||||||
name: "test_prompt",
|
name: "test_prompt",
|
||||||
description: "Test prompt",
|
description: "Test prompt",
|
||||||
) do |_args, _server_context:|
|
) do
|
||||||
MCP::PromptResponse.new(messages: [{ role: "user", content: "Test" }])
|
MCP::PromptResponse.new(messages: [{ role: "user", content: "Test" }])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ module MCP
|
||||||
arguments: [
|
arguments: [
|
||||||
Prompt::Argument.new(name: "test_argument", description: "Test argument", required: true),
|
Prompt::Argument.new(name: "test_argument", description: "Test argument", required: true),
|
||||||
],
|
],
|
||||||
) do |_|
|
) do
|
||||||
Prompt::Result.new(
|
Prompt::Result.new(
|
||||||
description: "Hello, world!",
|
description: "Hello, world!",
|
||||||
messages: [
|
messages: [
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ module MCP
|
||||||
name: "mock_tool",
|
name: "mock_tool",
|
||||||
title: "Mock Tool",
|
title: "Mock Tool",
|
||||||
description: "a mock tool for testing",
|
description: "a mock tool for testing",
|
||||||
) do |_|
|
) do
|
||||||
Tool::Response.new([{ type: "text", content: "OK" }])
|
Tool::Response.new([{ type: "text", content: "OK" }])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -141,7 +141,7 @@ module MCP
|
||||||
read_only_hint: true,
|
read_only_hint: true,
|
||||||
title: "Mock Tool",
|
title: "Mock Tool",
|
||||||
},
|
},
|
||||||
) do |_|
|
) do
|
||||||
Tool::Response.new([{ type: "text", content: "OK" }])
|
Tool::Response.new([{ type: "text", content: "OK" }])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -347,7 +347,7 @@ module MCP
|
||||||
title: "Mock Tool",
|
title: "Mock Tool",
|
||||||
description: "a mock tool for testing",
|
description: "a mock tool for testing",
|
||||||
output_schema: { properties: { result: { type: "string" } }, required: ["result"] },
|
output_schema: { properties: { result: { type: "string" } }, required: ["result"] },
|
||||||
) do |_|
|
) do
|
||||||
Tool::Response.new([{ type: "text", content: "OK" }])
|
Tool::Response.new([{ type: "text", content: "OK" }])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue