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

Function rpcAttrs

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

Source from the content-addressed store, hash-verified

172};
173
174const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> =>
175 Option.match(envelope, {
176 onNone: () => ({}),
177 onSome: (e) => ({
178 ...(e.method && { "mcp.rpc.method": e.method }),
179 ...(e.id !== undefined && e.id !== null && { "mcp.rpc.id": String(e.id) }),
180 ...methodAttrs(e),
181 ...replyAttrs(e),
182 }),
183 });
184
185export const annotateMcpRequest = (
186 request: Request,

Callers 1

annotateMcpRequestFunction · 0.85

Calls 2

methodAttrsFunction · 0.85
replyAttrsFunction · 0.85

Tested by

no test coverage detected