koala73/worldmonitor · error · McpSourceUnavailableError

No digest input feeds are available

Error message

No digest input feeds are available

What it means

McpSourceUnavailableError thrown by requireAnyInput (api/mcp/registry/analysis-tools.ts:173) for digest-consuming analysis tools: every digest input feed payload was null, so no digest can be produced or analyzed. Carries unavailable_inputs and failed_inputs in typed fields; dispatch preserves them in JSON-RPC error.data.

Solutions

  1. Use error.data to separate Redis failures (failed_inputs) from unseeded digests (unavailable_inputs)
  2. Check digest key freshness (news:digest:...) on the health endpoint
  3. Retry after the digest producer's next publish
  4. Seed the digest keys or fix the producer if health reports them missing
Defensive patterns

Strategy: retry

Validate before calling

const health = await fetch('https://<host>/api/health').then(r => r.json());
const digestReady = digestInputKeys.every(k => health?.datasets?.[k]?.fresh !== false);

Type guard

function isSourceUnavailable(e) {
  return e?.name === 'McpSourceUnavailableError' || Array.isArray(e?.data?.unavailable_inputs);
}

Try / catch

try {
  await client.callTool(digestAnalysisTool, args);
} catch (e) {
  if (isSourceUnavailable(e)) {
    return e.data?.failed_inputs?.length ? retryWithBackoff(call, 3) : retryAfter(digestProducerCadence);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling a digest-based analysis tool while all digest input cache keys are null: news digest producer not publishing, keys expired, unseeded deployment, or Redis read failures.

Common situations: News digest cron/edge job failure. New variant or locale deployed before its digest producer ran. Upstash outage or eviction. Env mismatch between MCP edge and producer store.

Related errors


AI-assisted analysis of koala73/worldmonitor@7d06c8633d (2026-08-21). Data as JSON: /api/errors/e4df8b4aa190f224. Report an issue: GitHub.

Appendix: source

Thrown at api/mcp/registry/analysis-tools.ts:181

      stale: evaluated.stale || unavailableInputs.length > 0,
      unavailable_inputs: unavailableInputs,
      failed_inputs: failedInputs,
    },
  };
}

const ANALYSIS_CACHE_STATUS_PROPERTIES = {
  unavailable_inputs: {
    type: 'array',
    items: { type: 'string' },
    description: 'Required cache keys that were missing or unreadable; their contribution is not treated as quiet.',
  },
  failed_inputs: {
    type: 'array',
    items: { type: 'string' },
    description: 'Subset of unavailable_inputs whose Redis read failed rather than returning a genuine miss.',
  },
} as const;

type AnalysisFreshness = Awaited<ReturnType<typeof readCachesWithFreshness>>['freshness'];

function requireAnyInput(
  payloads: unknown[],
  freshness: AnalysisFreshness,
  message: string,
): void {
  if (payloads.every((value) => value === null)) {
    throw new McpSourceUnavailableError(
      message,
      freshness.unavailable_inputs,
      freshness.failed_inputs,
    );
  }
}

function resolveLimit(raw: unknown, fallback: number): number {

View on GitHub (pinned to 7d06c8633d)