/** * @fileoverview Fetch an HN user profile with optional submission resolution. * @module mcp-server/tools/definitions/get-user.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const getUser: import("@cyanheads/mcp-ts-core").ToolDefinition; submissionCount: z.ZodDefault; submissionOffset: z.ZodDefault; }, z.core.$strip>, z.ZodObject<{ user: z.ZodObject<{ id: z.ZodString; karma: z.ZodNumber; created: z.ZodNumber; about: z.ZodOptional; totalSubmissions: z.ZodNumber; }, z.core.$strip>; submissions: z.ZodOptional; url: z.ZodOptional; text: z.ZodOptional; score: z.ZodOptional; time: z.ZodOptional; descendants: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>, readonly [{ readonly reason: "user_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "HN reports no user account exists for the given username."; readonly recovery: "Verify the username spelling — HN usernames are case-sensitive."; 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, which a username outside HN’s charset can cause."; 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 submissionOffset: z.ZodOptional; readonly truncated: z.ZodOptional; readonly shown: z.ZodOptional; readonly cap: z.ZodOptional; readonly notice: z.ZodOptional; }>; //# sourceMappingURL=get-user.tool.d.ts.map