feat: carry mcp primitives content as a system prompt

This commit is contained in:
Kadxy
2025-01-09 10:09:46 +08:00
parent fe67f79050
commit 77be190d76
6 changed files with 448 additions and 275 deletions

View File

@@ -40,13 +40,13 @@ export async function createClient(
return client;
}
interface Primitive {
export interface Primitive {
type: "resource" | "tool" | "prompt";
value: any;
}
/** List all resources, tools, and prompts */
export async function listPrimitives(client: Client) {
export async function listPrimitives(client: Client): Promise<Primitive[]> {
const capabilities = client.getServerCapabilities();
const primitives: Primitive[] = [];
const promises = [];