make prompts pass args

This commit is contained in:
Ashwin Bhat
2024-10-08 14:54:56 -07:00
parent 0c66e16dda
commit 88df0cd453
4 changed files with 65 additions and 23 deletions

View File

@@ -80,16 +80,18 @@ export class McpClient {
);
}
async getPrompt(name: string): Promise<GetPromptResult> {
async getPrompt(
name: string,
args?: Record<string, string>,
): Promise<GetPromptResult> {
return await this.client.request(
{
method: "prompts/get",
params: { name },
params: { name, arguments: args },
},
GetPromptResultSchema,
);
}
// Tool Operations
async listTools(): Promise<ListToolsResult> {
return await this.client.request(