Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ defmodule MyApp.MCPServer do
version: "1.0.0",
capabilities: [:tools]

require Logger

@impl true
# this callback will be called when the
# MCP initialize lifecycle completes
Expand All @@ -48,7 +50,7 @@ defmodule MyApp.MCPServer do
end

@impl true
def handle_tool("echo", %{text: text}, frame) do
def handle_tool_call("echo", %{text: text}, frame) do
Logger.info("This tool was called #{frame.assigns.counter + 1}")
{:reply, text, assign(frame, counter: frame.assigns.counter + 1)}
end
Expand Down