Merge pull request #183 from stonexer/main

docs: Update README for client method usage
This commit is contained in:
Justin Spahr-Summers 2025-04-07 11:10:47 +01:00 • committed by GitHub
commit cb6d7dde43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -471,15 +471,20 @@ await client.connect(transport);
const prompts = await client.listPrompts();
// Get a prompt
const prompt = await client.getPrompt("example-prompt", {
arg1: "value"
const prompt = await client.getPrompt({
name: "example-prompt",
arguments: {
arg1: "value"
}
});
// List resources
const resources = await client.listResources();
// Read a resource
const resource = await client.readResource("file:///example.txt");
const resource = await client.readResource({
uri: "file:///example.txt"
});
// Call a tool
const result = await client.callTool({