Skip to content

Conversation

@JohnCoene
Copy link
Member

Adds support for ellmer::tool.

# create an ellmer tool
current_time <- ellmer::tool(
  \(tz = "UTC") {
    format(Sys.time(), tz = tz, usetz = TRUE)
  },
  "Gets the current time in the given time zone.",
  tz = ellmer::type_string(
    "The time zone to get the current time in. Defaults to `\"UTC\"`.",
    required = FALSE
  )
)

mcp <- new_server(
  name = "R Calculator Server",
  description = "A simple calculator server implemented in R",
  version = "1.0.0"
)

# register ellmer tool with mcpr server
mcp <- add_capability(mcp, current_time)

serve_io(mcp)

@JohnCoene JohnCoene self-assigned this Jun 19, 2025
@netlify
Copy link

netlify bot commented Jun 19, 2025

Deploy Preview for mcpr ready!

Name Link
🔨 Latest commit 113e1eb
🔍 Latest deploy log https://app.netlify.com/projects/mcpr/deploys/68543e647f47dd0008f31bda
😎 Deploy Preview https://deploy-preview-6--mcpr.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JohnCoene JohnCoene merged commit 8dc8bac into master Jun 19, 2025
6 checks passed
@JohnCoene JohnCoene deleted the feat/ellmer-tools branch June 20, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants