const require_define = require('./define-BfP4rFlE.cjs');
const require_api = require('./api-CZD9zwQ-.cjs');

//#region src/tools/whoami.ts
var whoami_default = require_define.defineTool({
	name: "whoami",
	description: [
		"Identify the authenticated user in Sentry.",
		"",
		"Use this tool when you need to:",
		"- Get the user's name and email address."
	].join("\n"),
	inputSchema: {},
	requiredScopes: [],
	annotations: {
		readOnlyHint: true,
		openWorldHint: true
	},
	async handler(params, context) {
		const apiService = require_api.apiServiceFromContext(context);
		const user = await apiService.getAuthenticatedUser();
		let output = `You are authenticated as ${user.name} (${user.email}).\n\nYour Sentry User ID is ${user.id}.`;
		const constraints = context.constraints;
		if (constraints.organizationSlug || constraints.projectSlug || constraints.regionUrl) {
			output += "\n\n## Session Constraints\n\n";
			if (constraints.organizationSlug) output += `- **Organization**: ${constraints.organizationSlug}\n`;
			if (constraints.projectSlug) output += `- **Project**: ${constraints.projectSlug}\n`;
			if (constraints.regionUrl) output += `- **Region URL**: ${constraints.regionUrl}\n`;
			output += "\nThese constraints limit the scope of this MCP session.";
		}
		return output;
	}
});

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