ox_lib plugin

Notify, trigger client callbacks, reflective dotted-path calls into the ox_lib server module.

Detects ox_lib. Uses @overextended/ox_lib/server for typed access — every named export becomes reachable through the reflective oxlib_call tool.

Tools

ToolPurpose
oxlib_notify({ serverId, title, description?, type?, duration?, position? })Push a UI notification to one client
oxlib_trigger_client_callback({ serverId, event, args?, timeoutMs? })Round-trip RPC via lib.callback. Returns the client's reply
oxlib_check_dependency({ resource, minVersion })Wraps versionCheck("<resource>@<semver>")
oxlib_list_methodsEnumerate server-side ox_lib functions + namespace properties
oxlib_call({ path, args? })Reflective dotted-path invocation

Reflective examples

oxlib_list_methods({})
// → {
//     methods: ["addAce", "addCommand", "createObject", "checkDependency",
//               "onClientCallback", "registerHook", "triggerClientCallback",
//               "versionCheck", ...],
//     namespaces: ["cache", "lib", "locale"]
//   }

oxlib_call({ path: "cache.serverId" })
// → { kind: "value", value: 0 }

oxlib_call({ path: "addCommand", args: ["myadminthing", { restricted: "group.admin" }, () => {}] })
// (mutating verb — needs agent_api_readonly=false)

Convars

set agent_api_plugin_oxlib_enabled         auto    # auto | true | false
set agent_api_plugin_oxlib_blocked_methods ""      # csv to refuse on oxlib_call

Gotchas

  • Some ox_lib server functions accept callback functions as arguments — those can't cross the MCP boundary (the agent can't pass a function over JSON-RPC). Use onClientCallback to register a handler from inside another resource if you need callback wiring, then trigger from agent_api via triggerClientCallback.
  • versionCheck throws if the dependency isn't met — that becomes an INTERNAL envelope with the error message. That's intentional: the agent should branch on it.