MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / parseJsonContent

Function parseJsonContent

packages/hosts/mcp/src/tool-server.ts:1247–1251  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

1245const decodeJsonObjectString = Schema.decodeUnknownOption(JsonObjectFromString);
1246
1247const parseJsonContent = (raw: string): Record<string, unknown> | undefined => {
1248 if (raw === "{}") return undefined;
1249 const parsed = decodeJsonObjectString(raw);
1250 return Option.isSome(parsed) ? parsed.value : undefined;
1251};
1252
1253// ---------------------------------------------------------------------------
1254// Passthrough surface

Callers 1

createExecutorMcpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected