We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tobs-code/a-mem-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
serializers.py•561 B
"""
Serialization helpers for exposing memory data via CLI/MCP tools.
"""
from __future__ import annotations
from typing import Any, Dict
from ..models.note import AtomicNote
def serialize_note(note: AtomicNote) -> Dict[str, Any]:
"""
Returns a JSON-serializable dict representation of an AtomicNote.
Dates are converted to ISO strings so that webviews and CLIs
don't have to handle datetime objects manually.
"""
data = note.model_dump()
data["created_at"] = note.created_at.isoformat()
return data