Skip to main content
Glama

Sentry MCP

Official
by getsentry
whoami.test.ts1.99 kB
import { describe, it, expect } from "vitest"; import whoami from "./whoami.js"; import { createTestContext, createTestContextWithConstraints, } from "../test-utils/context.js"; describe("whoami", () => { it("serializes without constraints", async () => { const result = await whoami.handler( {}, createTestContext({ constraints: {}, accessToken: "access-token", userId: "123456", }), ); expect(result).toMatchInlineSnapshot( ` "You are authenticated as Test User (test@example.com). Your Sentry User ID is 123456." `, ); }); it("serializes with constraints", async () => { const result = await whoami.handler( {}, createTestContextWithConstraints( { organizationSlug: "sentry", projectSlug: "mcp-server", regionUrl: "https://us.sentry.io", }, { accessToken: "access-token", userId: "123456", }, ), ); expect(result).toMatchInlineSnapshot( ` "You are authenticated as Test User (test@example.com). Your Sentry User ID is 123456. ## Session Constraints - **Organization**: sentry - **Project**: mcp-server - **Region URL**: https://us.sentry.io These constraints limit the scope of this MCP session." `, ); }); it("serializes with partial constraints", async () => { const result = await whoami.handler( {}, createTestContextWithConstraints( { organizationSlug: "sentry", }, { accessToken: "access-token", userId: "123456", }, ), ); expect(result).toMatchInlineSnapshot( ` "You are authenticated as Test User (test@example.com). Your Sentry User ID is 123456. ## Session Constraints - **Organization**: sentry These constraints limit the scope of this MCP session." `, ); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getsentry/sentry-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server