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

Function streamedCandidate

packages/plugins/openapi/src/sdk/preview.ts:584–600  ·  view source on GitHub ↗
(op: StreamedPreviewOperation)

Source from the content-addressed store, hash-verified

582// ---------------------------------------------------------------------------
583
584const streamedCandidate = (op: StreamedPreviewOperation): HealthCheckCandidate => {
585 const method = op.method.toLowerCase();
586 const parameters = [
587 ...op.parameters,
588 ...(op.requestBodyRequired === undefined
589 ? []
590 : [{ name: "body", location: "body", required: op.requestBodyRequired }]),
591 ];
592 return {
593 operation: op.toolPath,
594 method,
595 requiredArgCount: parameters.filter((parameter) => parameter.required).length,
596 destructive: DESTRUCTIVE_METHODS.has(method),
597 summary: op.summary ?? op.description ?? `${method.toUpperCase()} ${op.pathTemplate}`,
598 ...(parameters.length > 0 ? { parameters } : {}),
599 };
600};
601
602/**
603 * Streaming twin of `previewSpecText` for spec-format selections (Microsoft

Callers 1

preview.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected