Commit 76a2a57
fix: Add ISO datetime serialization to MCP schema models
Fixes MCP client schema validation failures for build_context tool
by ensuring datetime fields are serialized as ISO format strings.
MCP clients expect "date-time" format validation, which requires
datetime objects to be serialized as ISO strings (e.g. "2023-12-08T10:30:00")
rather than Python datetime objects.
Changes:
- Added ConfigDict with json_encoders to EntitySummary, RelationSummary,
ObservationSummary, and MemoryMetadata models
- Ensures datetime fields serialize as dt.isoformat() strings
Resolves persistent schema validation issues reported in #263
Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: jope-bm <jope-bm@users.noreply.github.com>1 parent f3d8d8d commit 76a2a57
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
| 149 | + | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
| |||
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| 162 | + | |
| 163 | + | |
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
| |||
0 commit comments