export function buildTextContent(text: string): any {
return {
content: [
{
type: "text",
text,
},
],
};
}
export function buildUserMessage(text: string): any {
return {
messages: [
{
role: "user",
content: {
type: "text",
text,
},
},
],
};
}
export function buildResourceResponse(
uri: any,
text: string,
mimeType: string = "text/plain"
): any {
return {
contents: [
{
uri: uri.toString(),
text,
mimeType,
},
],
};
}
export function buildResourceList(
resources: Array<{ uri: string; name: string }>
): any {
return {
resources,
};
}