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

Function rpcAttrs

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

Source from the content-addressed store, hash-verified

192};
193
194const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> =>
195 Option.match(envelope, {
196 onNone: () => ({}),
197 onSome: (e) => ({
198 ...(e.method && { "mcp.rpc.method": e.method }),
199 ...(e.id !== undefined && e.id !== null && { "mcp.rpc.id": String(e.id) }),
200 ...methodAttrs(e),
201 ...replyAttrs(e),
202 }),
203 });
204
205export const annotateMcpRequest = (
206 request: Request,

Callers 1

annotateMcpRequestFunction · 0.85

Calls 2

methodAttrsFunction · 0.85
replyAttrsFunction · 0.85

Tested by

no test coverage detected