We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import z from "zod";
import {
vercelAIChatPartImageSchema,
vercelAIChatPartTextSchema,
vercelAIChatPartToolCallSchema,
vercelAIChatPartToolResultSchema,
} from "./messagePartSchemas";
/*
*
* Vercel AI SDK Message Schemas
*
*/
export const vercelAIMessageRoleSchema = z.enum([
"system",
"user",
"assistant",
"tool",
]);
export type VercelAIMessageRole = z.infer<typeof vercelAIMessageRoleSchema>;
export const vercelAIMessageSchema = z.discriminatedUnion("role", [
z.object({
role: z.literal("system"),
content: z.string(),
}),
z.object({
role: z.literal("user"),
content: z.union([
z
.union([vercelAIChatPartTextSchema, vercelAIChatPartImageSchema])
.array(),
z.string(),
]),
}),
z.object({
role: z.literal("assistant"),
content: z.union([
z
.union([vercelAIChatPartTextSchema, vercelAIChatPartToolCallSchema])
.array(),
z.string(),
]),
}),
z.object({
role: z.literal("tool"),
content: vercelAIChatPartToolResultSchema.array(),
}),
]);
export type VercelAIMessage = z.infer<typeof vercelAIMessageSchema>;