UNPKG

jsonv-ts

Version:

JSON Schema builder and validator for TypeScript with static type inference, Hono middleware for OpenAPI generation and validation, and MCP server/client implementation. Lightweight, dependency-free, and built on Web Standards.

48 lines (47 loc) 1.83 kB
import * as s from "jsonv-ts"; import { RpcMessage, type TRpcRequest } from "../rpc"; export declare class ToolsListMessage extends RpcMessage { method: string; params: s.ObjectSchema<{}, s.IObjectOptions> & s.IObjectOptions; respond(message: TRpcRequest): Promise<import("..").TRpcResponse<{ tools: { name: any; title: string | undefined; description: string | undefined; inputSchema: s.JSONSchemaDefinition; outputSchema: s.JSONSchemaDefinition | undefined; annotations: { title?: string | undefined; readOnlyHint?: boolean | undefined; destructiveHint?: boolean | undefined; idempotentHint?: boolean | undefined; openWorldHint?: boolean | undefined; } | undefined; _meta: { [key: string]: unknown; } | undefined; }[]; }>>; } export declare class ToolsCallMessage extends RpcMessage { method: string; params: s.ObjectSchema<{ readonly name: s.StringSchema<s.IStringOptions> & s.IStringOptions; readonly arguments: { additionalProperties: s.Schema<s.IAnyOptions, any, any> & s.IAnyOptions; } & s.Schema<s.ISchemaOptions, { [x: string]: any; } | undefined, { [x: string]: any; } | undefined>; }, s.IObjectOptions> & s.IObjectOptions; respond(message: TRpcRequest<typeof this.params>, request: Request): Promise<import("..").TRpcResponse<{ content: (import("../tool").ToolResponseText & any[]) | import("../tool").ToolResponseText[]; }> | import("..").TRpcResponse<{ content: { type: string; text: string; }[]; isError: boolean; }>>; }