Goal
Add a Gateway RPC method for SDK-facing generic tool invocation.
There is an HTTP /tools/invoke route, but @openclaw/sdk currently has oc.tools.invoke() scaffolded as unsupported. The SDK should have a clean Gateway RPC method with the same policy/approval semantics as other tool invocation paths.
Proposed method
tools.invoke
type ToolsInvokeParams = {
name: string;
args?: Record<string, unknown>;
sessionKey?: string;
agentId?: string;
confirm?: boolean;
idempotencyKey?: string;
};
Acceptance criteria
References
Goal
Add a Gateway RPC method for SDK-facing generic tool invocation.
There is an HTTP
/tools/invokeroute, but@openclaw/sdkcurrently hasoc.tools.invoke()scaffolded as unsupported. The SDK should have a clean Gateway RPC method with the same policy/approval semantics as other tool invocation paths.Proposed method
tools.invokeAcceptance criteria
@openclaw/sdkcan implementoc.tools.invoke()against it.References