UNPKG

@uh-joan/cortellis-mcp-server

Version:

MCP server for Cortellis drug database search and ontology exploration

22 lines (21 loc) 864 B
import { McpError } from "@modelcontextprotocol/sdk/types.js"; export type JsonPrimitive = string | number | boolean | null; export type JsonArray = JsonValue[]; export type JsonObject = { [key: string]: JsonValue; }; export type JsonValue = JsonPrimitive | JsonArray | JsonObject; /** * Removes null and undefined values from an object */ export declare function cleanObject<T extends JsonObject>(obj: T): Partial<T>; /** * Deep cleans an object or array of null and undefined values */ export declare function deepCleanObject<T extends JsonValue>(obj: T): T; /** * Creates a standardized error object */ export declare function createError(message: string, code?: number): McpError; export declare function pickBySchema(obj: unknown, schema: unknown): unknown; export declare function flattenArraysInObject(input: unknown, inArray?: boolean): unknown;