Skip to content

Commit dacd5f1

Browse files
committed
[Doc] Fix incorrect examples in README.md
This PR fixes incorrect examples in README.md. The block variable could be removed if it is unused, but when presenting an example `:server_context` should still be shown as a keyword argument. Fixes #185.
1 parent d31c3da commit dacd5f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ tool = MCP::Tool.define(
434434
read_only_hint: true,
435435
title: "My Tool"
436436
}
437-
) do |args, server_context|
437+
) do |args, server_context:|
438438
MCP::Tool::Response.new([{ type: "text", text: "OK" }])
439439
end
440440
```
@@ -450,7 +450,7 @@ server.define_tool(
450450
title: "My Tool",
451451
read_only_hint: true
452452
}
453-
) do |args, server_context|
453+
) do |args, server_context:|
454454
Tool::Response.new([{ type: "text", text: "OK" }])
455455
end
456456
```
@@ -540,7 +540,7 @@ tool = MCP::Tool.define(
540540
},
541541
required: ["mean", "median", "count"]
542542
}
543-
) do |args, server_context|
543+
) do |args, server_context:|
544544
# Calculate statistics and validate against schema
545545
MCP::Tool::Response.new([{ type: "text", text: "Statistics calculated" }])
546546
end

0 commit comments

Comments
 (0)