Skip to content

Conversation

@simonpcouch
Copy link
Collaborator

@simonpcouch simonpcouch commented May 8, 2025

So far, acquaint has only supported tools from btw. This PR allows users to register any other ellmer tools they'd like to be able to run in their R session.

This could be e.g.

  • A general execute_r_code() tool, for the brave
  • A suite of tools specifically aimed at R package development, presumably hooked up to something like Claude Code or Codex

Here's an example chat where I've registered rnorm as a tool using the following in my .Rprofile:

tool_rnorm <- ellmer::tool(
  stats::rnorm,
  "Draw numbers from a random normal distribution",
  n = ellmer::type_integer(
    "The number of observations. Must be a positive integer."
  ),
  mean = ellmer::type_number("The mean value of the distribution."),
  sd = ellmer::type_number(
    "The standard deviation of the distribution. Must be a non-negative number."
  ),
  .name = "random_normal"
)

acquaint::set_acquaint_tools(list(tool_rnorm))

@shikokuchuo
Copy link
Member

shikokuchuo commented May 8, 2025

So, naming... if we expect the call (usually) to be namespaced, would the repetition of 'acquaint' be a bit verbose? Would mcp_set_tools() make sense? Just a thought - whatever you decide is fine.

@simonpcouch
Copy link
Collaborator Author

Yeah, good point.

  • set_tools() feels a bit aggressive, e.g. might name-conflict with too many things
  • mcp_tools() is maybe okay and fits in with the naming pattern nicely, but ambiguous whether it gets or sets the tools?
  • set_mcp_tools() is almost as long as set_acquaint_tools().

Thoughts?

@simonpcouch
Copy link
Collaborator Author

Oh, didn't see you had updated your comment—I think mcp_set_tools() is reasonable!

@simonpcouch simonpcouch merged commit b489740 into main May 19, 2025
6 checks passed
@simonpcouch simonpcouch deleted the arbitrary-tools branch May 19, 2025 15:53
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.

3 participants