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

Function rpcAttrs

apps/cloud/src/mcp/telemetry.ts:223–232  ·  view source on GitHub ↗
(envelope: Option.Option<JsonRpcEnvelope>)

Source from the content-addressed store, hash-verified

221};
222
223const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> =>
224 Option.match(envelope, {
225 onNone: () => ({}),
226 onSome: (e) => ({
227 ...(e.method && { "mcp.rpc.method": e.method }),
228 ...(e.id !== undefined && e.id !== null && { "mcp.rpc.id": String(e.id) }),
229 ...methodAttrs(e),
230 ...replyAttrs(e),
231 }),
232 });
233
234export const annotateMcpRequest = (
235 request: Request,

Callers 1

annotateMcpRequestFunction · 0.85

Calls 2

methodAttrsFunction · 0.85
replyAttrsFunction · 0.85

Tested by

no test coverage detected