import { ConfigurationError } from "./errors-D_R568zP.js";
import { callEmbeddedAgent } from "./callEmbeddedAgent-BSnzLPfW.js";
import { systemPrompt } from "./config-CTRUv0J3.js";
import { z } from "zod";

//#region src/tools/use-sentry/agent.ts
/**
* Output schema for the embedded agent.
* The agent returns the final result string directly from its tool calls.
*/
const outputSchema = z.object({ result: z.string().describe("The final result from your tool calls that answers the user's request") });
/**
* use_sentry agent - executes natural language requests using Sentry MCP tools
* This returns the final result AND the tool calls made by the agent
*/
async function useSentryAgent(options) {
	if (!process.env.OPENAI_API_KEY) throw new ConfigurationError("OPENAI_API_KEY environment variable is required for use_sentry tool");
	const prompt = options.request;
	return await callEmbeddedAgent({
		system: systemPrompt,
		prompt,
		tools: options.tools,
		schema: outputSchema
	});
}

//#endregion
export { useSentryAgent };
//# sourceMappingURL=agent-tLRcGXXr.js.map