Skip to main content
Glama
session.schema.ts889 B
import { Schema } from 'mongoose'; import type { SessionSchema } from '@/types/session.types'; export const sessionSchema = new Schema<SessionSchema>( { activeOrganizationId: { type: Schema.Types.ObjectId, ref: 'Organization', required: false, }, activeProjectId: { type: Schema.Types.ObjectId, ref: 'Project', required: false, }, }, { timestamps: true, toJSON: { virtuals: true, // keep the automatic `id` getter versionKey: false, // drop __v transform(_doc, ret: any) { const { _id, ...rest } = ret; return { ...rest, id: _id.toString(), }; }, }, toObject: { virtuals: true, transform(_doc, ret: any) { const { _id, ...rest } = ret; return { ...rest, id: _id, }; }, }, } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server