const require_chunk = require('./chunk-DWy1uDak.cjs');
const require_errors = require('./errors-BtJEw2Z-.cjs');
const require_callEmbeddedAgent = require('./callEmbeddedAgent-KKTSTD7W.cjs');
const require_config = require('./config-ClFI6orZ.cjs');
const zod = require_chunk.__toESM(require("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 = zod.z.object({ result: zod.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 require_errors.ConfigurationError("OPENAI_API_KEY environment variable is required for use_sentry tool");
	const prompt = options.request;
	return await require_callEmbeddedAgent.callEmbeddedAgent({
		system: require_config.systemPrompt,
		prompt,
		tools: options.tools,
		schema: outputSchema
	});
}

//#endregion
Object.defineProperty(exports, 'useSentryAgent', {
  enumerable: true,
  get: function () {
    return useSentryAgent;
  }
});
//# sourceMappingURL=agent-DT4ic52w.cjs.map