/** * @fileoverview RunAgent tool implementation for the Glean MCP server. * * This module provides an interface to Glean's RunAgent API through the MCP protocol. * It defines the schema for RunAgent parameters and implements the functionality * to run an agent using the Glean client SDK. * * @module tools/runagent */ import { z } from 'zod'; /** * Schema for the RunAgent request. */ export declare const RunAgentSchema: z.ZodObject<{ agentId: z.ZodString; fields: z.ZodRecord; stream: z.ZodOptional; agentConfig: z.ZodOptional>; mode: z.ZodDefault>; }, "strip", z.ZodTypeAny, { agent: "DEFAULT" | "GPT"; mode: "DEFAULT" | "QUICK"; }, { agent?: "DEFAULT" | "GPT" | undefined; mode?: "DEFAULT" | "QUICK" | undefined; }>>; authTokens: z.ZodOptional; tokenType: z.ZodOptional; authUser: z.ZodOptional; expiration: z.ZodOptional; }, "strip", z.ZodTypeAny, { datasource: string; accessToken: string; scope?: string | undefined; tokenType?: string | undefined; authUser?: string | undefined; expiration?: number | undefined; }, { datasource: string; accessToken: string; scope?: string | undefined; tokenType?: string | undefined; authUser?: string | undefined; expiration?: number | undefined; }>, "many">>; timeoutMillis: z.ZodOptional; timezoneOffset: z.ZodOptional; }, "strip", z.ZodTypeAny, { agentId: string; fields: Record; authTokens?: { datasource: string; accessToken: string; scope?: string | undefined; tokenType?: string | undefined; authUser?: string | undefined; expiration?: number | undefined; }[] | undefined; timezoneOffset?: number | undefined; timeoutMillis?: number | undefined; agentConfig?: { agent: "DEFAULT" | "GPT"; mode: "DEFAULT" | "QUICK"; } | undefined; stream?: boolean | undefined; }, { agentId: string; fields: Record; authTokens?: { datasource: string; accessToken: string; scope?: string | undefined; tokenType?: string | undefined; authUser?: string | undefined; expiration?: number | undefined; }[] | undefined; timezoneOffset?: number | undefined; timeoutMillis?: number | undefined; agentConfig?: { agent?: "DEFAULT" | "GPT" | undefined; mode?: "DEFAULT" | "QUICK" | undefined; } | undefined; stream?: boolean | undefined; }>; /** * Executes an agent run using the Glean API. * * @param {z.infer} params - Parameters for the agent run * @returns {Promise} The response from the agent */ export declare function runAgent(params: z.infer): Promise; /** * Formats the agent response into a readable string. * * @param {unknown} response - The response from the agent * @returns {string} A formatted string representation of the response */ export declare function formatResponse(response: unknown): string; //# sourceMappingURL=runagent.d.ts.map