| 1231 | }; |
| 1232 | |
| 1233 | const artifactNotFoundResult = (id: string): McpToolResult => ({ |
| 1234 | content: [ |
| 1235 | { |
| 1236 | type: "text", |
| 1237 | text: `No artifact with id "${id}". Call list-artifacts to see what is saved.`, |
| 1238 | }, |
| 1239 | ], |
| 1240 | structuredContent: { status: "error", error: "artifact_not_found", id }, |
| 1241 | isError: true, |
| 1242 | }); |
| 1243 | |
| 1244 | const JsonObjectFromString = Schema.fromJsonString(Schema.Record(Schema.String, Schema.Unknown)); |
| 1245 | const decodeJsonObjectString = Schema.decodeUnknownOption(JsonObjectFromString); |