Skip to content

Commit cb6d7dd

Browse files
Merge pull request #183 from stonexer/main
docs: Update README for client method usage
2 parents 4b69f40 + 6bfa975 commit cb6d7dd

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
@@ -471,15 +471,20 @@ await client.connect(transport);
471471
const prompts = await client.listPrompts();
472472

473473
// Get a prompt
474-
const prompt = await client.getPrompt("example-prompt", {
475-
arg1: "value"
474+
const prompt = await client.getPrompt({
475+
name: "example-prompt",
476+
arguments: {
477+
arg1: "value"
478+
}
476479
});
477480

478481
// List resources
479482
const resources = await client.listResources();
480483

481484
// Read a resource
482-
const resource = await client.readResource("file:///example.txt");
485+
const resource = await client.readResource({
486+
uri: "file:///example.txt"
487+
});
483488

484489
// Call a tool
485490
const result = await client.callTool({

0 commit comments

Comments
 (0)