UNPKG

@toolplex/client

Version:

The official ToolPlex client for AI agent tool discovery and execution

34 lines (33 loc) 911 B
import { Tool } from "@modelcontextprotocol/sdk/types.js"; import { ToolplexApiService } from "./toolplexApi/service.js"; import { ClientContext } from "./clientContext.js"; export declare class ToolDefinitionsCache { private _tools; private _version; constructor(); /** * Initialize tools cache by fetching tools from API * Handles errors if fetching fails, but does not rethrow. */ init(service: ToolplexApiService, _clientContext: ClientContext): Promise<void>; /** * Get all cached tool definitions */ getTools(): Tool[]; /** * Get a specific tool by name from the cache */ getTool(name: string): Tool; /** * Get the version of the current tools */ getVersion(): string; /** * Check if the cache is initialized */ isInitialized(): boolean; /** * Reset the cache */ reset(): void; }