/** * @fileoverview crossref_get_prefix — resolves a DOI prefix to its owning Crossref member (publisher). * @module mcp-server/tools/definitions/get-prefix.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const getPrefixTool: import("@cyanheads/mcp-ts-core").ToolDefinition, z.ZodObject<{ prefix: z.ZodString; ownerName: z.ZodOptional; memberId: z.ZodOptional; }, z.core.$strip>, readonly [{ readonly reason: 'rate_limited'; readonly code: JsonRpcErrorCode.RateLimited; readonly thrownBy: 'service'; readonly when: 'Crossref answered HTTP 429 and the limit did not clear inside the retry budget.'; readonly recovery: 'Crossref named no wait interval, so back off at least a minute before reissuing the same call, and lower the request rate. Setting CROSSREF_MAILTO on the server moves requests into the polite pool, which has higher limits.'; }, { readonly reason: 'upstream_unavailable'; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly thrownBy: 'service'; readonly when: 'Crossref was unreachable, returned a 5xx status, or served an HTML error page instead of JSON.'; readonly recovery: 'The request was accepted as well-formed and Crossref failed to serve it — retry the same call in a minute rather than rewriting the query, and check https://status.crossref.org if it keeps failing.'; }, { readonly reason: 'malformed_response'; readonly code: JsonRpcErrorCode.SerializationError; readonly thrownBy: 'service'; readonly retryable: false; readonly when: 'Crossref returned HTTP 200 with a body that is not valid JSON.'; readonly recovery: 'Do not repeat the call unchanged — the body is corrupt rather than transient. Request less of the record (fewer rows, a narrower select) so a smaller response is serialized, or report the query that reproduces it.'; }, { readonly reason: 'request_timeout'; readonly code: JsonRpcErrorCode.Timeout; readonly thrownBy: 'service'; readonly when: 'Crossref did not respond within CROSSREF_TIMEOUT_MS, or answered HTTP 408/504.'; readonly recovery: 'Ask for less work per call — lower rows, drop select fields, or split a broad query — or raise CROSSREF_TIMEOUT_MS on the server, then retry.'; }, { readonly reason: "prefix_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The DOI prefix is not registered with Crossref."; readonly recovery: "Verify the prefix (the \"10.NNNN\" portion of a DOI), or use crossref_search_works to find the work and its publisher."; }], undefined>; //# sourceMappingURL=get-prefix.tool.d.ts.map