History

docs(sdk): invoke tools by address, not id (#1916)

Aarushi Singh committed 2 months ago

Commit 0ae7a251 parent f9a158c1 file · +2 −2Browse files

Unified · Split

packages/core/sdk/README.md+2−2
@@ -42,7 +42,7 @@ const executor = await createExecutor({ onElicitation: "accept-all" }); · 41 unmodified lines
42const tools = await executor.tools.list();42const tools = await executor.tools.list();
43const target = tools[0];43const target = tools[0];
44if (target) {44if (target) {
45 const result = await executor.tools.invoke(target.id, {45 const result = await executor.tools.invoke(target.address, {
46 /* args matching target.inputSchema */46 /* args matching target.inputSchema */
47 });47 });
48 console.log(result);48 console.log(result);
@@ -54,7 +54,7 @@ await executor.close(); · 5 unmodified lines
54Pass an `options` object only if you need to override the executor-level handler for a single call (rare — typically used by hosts that bridge per-client elicitation channels):54Pass an `options` object only if you need to override the executor-level handler for a single call (rare — typically used by hosts that bridge per-client elicitation channels):
55 55
56```ts56```ts
57await executor.tools.invoke(target.id, args, {57await executor.tools.invoke(target.address, args, {
58 onElicitation: customHandler,58 onElicitation: customHandler,
59});59});
60```60```

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t