Skip to content

Commit 6bfa975

Browse files
committed
docs: Update README for client method usage
1 parent 66e1508 commit 6bfa975

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,20 @@ await client.connect(transport);
459459
const prompts = await client.listPrompts();
460460

461461
// Get a prompt
462-
const prompt = await client.getPrompt("example-prompt", {
463-
arg1: "value"
462+
const prompt = await client.getPrompt({
463+
name: "example-prompt",
464+
arguments: {
465+
arg1: "value"
466+
}
464467
});
465468

466469
// List resources
467470
const resources = await client.listResources();
468471

469472
// Read a resource
470-
const resource = await client.readResource("file:///example.txt");
473+
const resource = await client.readResource({
474+
uri: "file:///example.txt"
475+
});
471476

472477
// Call a tool
473478
const result = await client.callTool({

0 commit comments

Comments
 (0)