Skip to main content
Use group(...) when a set of tools belongs together.

Example

app.group("db", (db) =>
  db
    .tool("query", {
      handler: () => ({ ok: true }),
    })
    .tool("insert", {
      handler: () => ({ ok: true }),
    })
);
This exposes:
  • db_query
  • db_insert

When to use groups

  • plugin tool bundles
  • admin or internal tools
  • database or API namespaces
  • collision avoidance

Recommendation

If a plugin exposes public tools, prefer an optional namespace or prefix option and implement it with group(...).