/** * Creates a standardized tool response from an API response * Handles both list and single item responses with proper formatting * * @example * // In tool handler: * return createToolResponse( * teamsService.listTeams(request?.arguments) * ); * * @param promise Promise that resolves to an API response * @returns Tool response with formatted content */ export declare function createToolResponse>(promise: Promise>): Promise; /** * Handles errors that occur during tool execution by catching exceptions and formatting them into a consistent response structure. * * @param handler - The async function to execute which may throw errors * @param args - Arguments to pass to the handler function * @returns A Promise resolving to either the original handler response or an error response object * with the structure: { isError: true, content: [{ type: "text", text: "error message" }] } * * @throws Never - All errors are caught and formatted into the response structure * * @example * ```typescript * const result = await toolErrorHandlers( * async (args) => { return await someToolFunction(args) }, * { param1: "value1" } * ); * ``` */ export declare function toolErrorHandlers(handler: (args: any) => Promise, args: any): Promise;