[Doc] Use registered callable names in examples/README.md#437
Merged
koic merged 1 commit intoJul 2, 2026
Merged
Conversation
The `tools/call` cURL example in `examples/README.md` uses `"name": "ExampleTool"`, but a tool registered by class without an explicit `tool_name` gets a snake_case name derived from its class name (via `StringUtils.handle_from_class_name`), so the example fails with `Tool not found: ExampleTool`. The Tools/Prompts lists in the same file had the same mismatch (`ExampleTool`, `ExamplePrompt`, `NotificationTool`). All entries now use the registered callable names. How Tested: Ran `ruby examples/http_server.rb` and exercised the cURL flow. `tools/list` returned `example_tool` and `echo`; `tools/call` with `"name": "ExampleTool"` returned `Tool not found: ExampleTool`; with `"name": "example_tool"` returned `The sum of 5 and 3 is 8`. `prompts/list` returned `example_prompt`. The full unit suite and RuboCop pass locally. Breaking Changes: None (documentation only).
koic
approved these changes
Jul 2, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
The
tools/callcURL example inexamples/README.mduses"name": "ExampleTool", but a tool registered by class without an explicittool_namegets a snake_case name derived from its class name (viaStringUtils.handle_from_class_name), so the example fails withTool not found: ExampleTool. The Tools/Prompts lists in the same file had the same mismatch (ExampleTool,ExamplePrompt,NotificationTool). All entries now use the registered callable names.How Has This Been Tested?
Ran
ruby examples/http_server.rblocally and exercised the cURL flow against it (SSE event payloads shown without thedata:prefix):The full unit suite and RuboCop pass locally.
Breaking Changes
None (documentation only).
Types of changes
Checklist