/** * @fileoverview Fetch an HN item and its comment tree via ranked BFS traversal. * @module mcp-server/tools/definitions/get-thread.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const getThread: import("@cyanheads/mcp-ts-core").ToolDefinition; maxComments: z.ZodDefault; }, z.core.$strip>, z.ZodObject<{ item: z.ZodObject<{ id: z.ZodNumber; type: z.ZodString; by: z.ZodOptional; time: z.ZodOptional; title: z.ZodOptional; url: z.ZodOptional; text: z.ZodOptional; score: z.ZodOptional; descendants: z.ZodOptional; }, z.core.$strip>; comments: z.ZodArray; time: z.ZodOptional; text: z.ZodOptional; depth: z.ZodNumber; parentId: z.ZodNumber; childCount: z.ZodNumber; isOp: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, readonly [{ readonly reason: "item_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "HN reports no item exists for the given itemId."; readonly recovery: "Verify the itemId via hn_search_content or a feed listing from hn_get_stories."; readonly severity: "notice"; }, { readonly reason: "upstream_rejected"; readonly code: JsonRpcErrorCode.InvalidParams; readonly when: "The HN API answered with a 4xx status other than 429 — it rejected the request as built."; readonly recovery: "Check the input values against this schema; the same input fails identically."; readonly thrownBy: "service"; }, { readonly reason: "upstream_rate_limited"; readonly code: JsonRpcErrorCode.RateLimited; readonly when: "The HN API answered with HTTP 429."; readonly recovery: "Wait several seconds before retrying, and call this tool less often."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_unavailable"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The HN API answered with a 5xx status."; readonly recovery: "Retry after a short delay; no input change helps while the upstream is down."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_html"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The HN API served an HTML error page with a 200 status, which it does under rate limiting or maintenance."; readonly recovery: "Retry after a brief delay; the upstream is throttling or in maintenance."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_malformed"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The HN API answered with a 200 status and a body that is not JSON."; readonly recovery: "Retry after a brief delay; no input change helps while the upstream serves this."; readonly retryable: true; readonly thrownBy: "service"; }], { readonly totalLoaded: z.ZodNumber; readonly totalAvailable: z.ZodOptional; readonly truncated: z.ZodOptional; readonly shown: z.ZodOptional; readonly cap: z.ZodOptional; readonly notice: z.ZodOptional; }>; //# sourceMappingURL=get-thread.tool.d.ts.map