/** * @fileoverview Search Hacker News via Algolia with filtering and pagination. * @module mcp-server/tools/definitions/search-content.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const searchHn: import("@cyanheads/mcp-ts-core").ToolDefinition; tags: z.ZodOptional>; author: z.ZodOptional; storyId: z.ZodOptional; sort: z.ZodDefault>; dateRange: z.ZodOptional; end: z.ZodOptional; }, z.core.$strip>>; minPoints: z.ZodOptional; count: z.ZodDefault; page: z.ZodDefault; view: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ hits: z.ZodArray; url: z.ZodOptional; domain: z.ZodOptional; author: z.ZodString; points: z.ZodOptional; numComments: z.ZodOptional; createdAt: z.ZodString; storyTitle: z.ZodOptional; storyId: z.ZodOptional; text: z.ZodOptional; highlights: z.ZodOptional; text: z.ZodOptional; matchedWords: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; query: z.ZodOptional; }, z.core.$strip>, readonly [{ readonly reason: "missing_query_or_filter"; readonly code: JsonRpcErrorCode.InvalidParams; readonly when: "Neither a query nor any filter was supplied, so there is nothing to search by."; readonly recovery: "Pass a query, or at least one filter: tags, author, storyId, minPoints, or a dateRange bound. sort, count, page, and view do not count as filters."; readonly severity: "notice"; }, { readonly reason: "invalid_date_range"; readonly code: JsonRpcErrorCode.InvalidParams; readonly when: "dateRange was supplied with neither bound, or with start not before end."; readonly recovery: "Give dateRange a start, an end, or both with start before end — both bounds are exclusive — or omit dateRange entirely."; readonly severity: "notice"; }, { readonly reason: "min_points_unscored_type"; readonly code: JsonRpcErrorCode.InvalidParams; readonly when: "minPoints was combined with tags \"comment\" or \"job\", record types Algolia stores without points."; readonly recovery: "Drop minPoints to search comments or jobs, or search a scored type (story, poll, ask_hn, show_hn, front_page) to filter by points."; readonly severity: "notice"; }, { readonly reason: "upstream_rejected"; readonly code: JsonRpcErrorCode.InvalidParams; readonly when: "Algolia 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: "Algolia answered with HTTP 429."; readonly recovery: "Wait the interval in retryAfter when the error carries one, otherwise several seconds, then retry and call this tool less often."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_unavailable"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "Algolia 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: "Algolia 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: "Algolia 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 totalHits: z.ZodNumber; readonly page: z.ZodNumber; readonly totalPages: z.ZodNumber; readonly truncated: z.ZodOptional; readonly shown: z.ZodOptional; readonly cap: z.ZodOptional; readonly notice: z.ZodOptional; }>; //# sourceMappingURL=search-content.tool.d.ts.map