import { type ToolDefinition } from './tools.js'; /** The revision this server prefers — the head of PROTOCOL_VERSIONS. */ export declare const PROTOCOL_VERSION = "2026-07-28"; /** tools/list is cached per user for five minutes — see cacheScope below. */ export declare const TOOLS_TTL_MS = 300000; /** * `server/discover` is cached for an hour, and publicly. * * Longer than the tool catalog because it carries less: a version list and a * capability set change when this process is replaced, not when a grant moves. */ export declare const DISCOVER_TTL_MS = 3600000; /** * The revisions reachable through `initialize`, newest first. * * 2026-07-28 splits clients into two eras, and this list is the older one: * a **legacy** client opens with `initialize` and negotiates a version in the * result, while a **modern** one carries the version on every request in * `_meta` and never sends `initialize` at all. Both transports serve both, * which the specification calls dual-era and its compatibility matrix says * works. * * The list matters because of one asymmetry the matrix states outright: * **legacy clients have no fall-forward mechanism.** A modern client that * hears a version it does not know retries with one from `supported`; a legacy * client can only fail. So whatever `initialize` answers has to be a version * that generation of client actually speaks. */ export declare const LEGACY_PROTOCOL_VERSIONS: readonly ["2025-11-25", "2025-06-18", "2025-03-26"]; /** * Every revision this server can speak, newest first — what `server/discover` * advertises and what the `MCP-Protocol-Version` header is checked against. * * The list is short because the surface is: `tools/list` and `tools/call` are * shaped the same in all of them, and nothing here uses a feature that moved. * `2025-11-25` was missing and that was not a small omission — it is the * newest revision any shipping client knows, so it is the one every real * client proposes. See the note on the `initialize` handler. */ export declare const PROTOCOL_VERSIONS: readonly ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26"]; /** * Tools and nothing else, which is the whole surface: no resources, no * prompts, no sampling. Declaring a capability this server does not serve is * how a client comes back with a call that 404s. * * `listChanged: false` is said rather than left out. This server sends no * `notifications/tools/list_changed` — the catalog is per caller and computed * on the request — and a client reading an absent field has to know the * default to reach the same conclusion. */ export declare const CAPABILITIES: { readonly tools: { readonly listChanged: false; }; }; /** * The revision to answer a legacy client with. * * Echo the proposal when this server speaks it; counter-offer the newest * **legacy** revision otherwise, never the newest overall — a client arriving * on `initialize` is legacy by definition, and it cannot fall forward to a * revision its own generation has never heard of. */ export declare const agreedVersion: (asked: unknown) => string; /** `initialize`'s result: the legacy handshake. */ export declare const initializeResult: (asked: unknown, serverVersion: string | undefined) => { protocolVersion: string; capabilities: { readonly tools: { readonly listChanged: false; }; }; serverInfo: { name: string; version: string; }; instructions: string; }; /** * `server/discover`'s result, a MUST for any server claiming this revision. * * It is `initialize` with the handshake taken out. A modern client sends no * `initialize` and negotiates nothing — it names a version on every request — * so what it needs up front is the list of versions to pick from and the * capabilities to expect. Both are static, which is why this answers without * touching a dependency and why `cacheScope` is `public`: unlike `tools/list`, * nothing in this result depends on who is asking. */ export declare const discoverResult: (serverVersion: string | undefined) => { resultType: string; supportedVersions: ("2026-07-28" | "2025-11-25" | "2025-06-18" | "2025-03-26")[]; capabilities: { readonly tools: { readonly listChanged: false; }; }; _meta: { 'io.modelcontextprotocol/serverInfo': { name: string; version: string; }; }; ttlMs: number; cacheScope: string; }; /** * `tools/list`'s result. * * The catalog depends on this caller's permissions, so the cache is per user. A * global cache would serve one caller's catalog — and the layer names inside * it — to another. */ export declare const toolsListResult: (tools: readonly ToolDefinition[]) => { tools: import("./tools.js").WireTool[]; ttlMs: number; cacheScope: string; }; /** * `ping`'s result: the empty object, by specification. * * Built here like the other three even though there is nothing to build, * because the method itself is what diverged: ping is a MUST-respond for both * parties in every revision, and STDIO answered it while Streamable HTTP fell * through to its 404 arm for the whole life of both — a client's keep-alive * dropping the very connection it was checking, over the transport the * product is for. A result the transports share is a result a dispatcher has * to name to return, and the parity suite reads both dispatchers' method * lists now, so losing the arm again fails there. */ export declare const pingResult: () => Record; /** * `tools/call`'s envelope: a CallToolResult, never the bare value. * * The protocol requires `content` to be a list of content blocks, and a * client that follows it rejects anything else. Both dispatchers used to * spell this object out by hand — two copies of the shape this module exists * to make one. */ export declare const callToolResult: (result: unknown) => { content: { type: string; text: string; }[]; isError: boolean; }; //# sourceMappingURL=results.d.ts.map