Skip to main content
Glama

create_project

Create a new project in Sentry MCP, providing a unique SENTRY_DSN for error tracking. Define project name, team, platform, and organization for effective monitoring setup.

Instructions

Create a new project in Sentry, giving you access to a new SENTRY_DSN.

Use this tool when you need to:

  • Create a new project in a Sentry organization

Input Schema

NameRequiredDescriptionDefault
nameYesThe name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.
organizationSlugNoThe organization's slug. This will default to the first org you have access to.
platformNoThe platform for the project (e.g., python, javascript, react, etc.)
teamSlugYesThe team's slug. This will default to the first team you have access to.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "name": { "description": "The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.", "type": "string" }, "organizationSlug": { "description": "The organization's slug. This will default to the first org you have access to.", "type": "string" }, "platform": { "description": "The platform for the project (e.g., python, javascript, react, etc.)", "type": "string" }, "teamSlug": { "description": "The team's slug. This will default to the first team you have access to.", "type": "string" } }, "required": [ "teamSlug", "name" ], "type": "object" }

Implementation Reference

  • The handler function that creates a new Sentry project using the apiService, optionally generates a client key (DSN), and returns formatted output with project details.
    async handler(params, context: ServerContext) { const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? undefined, }); const organizationSlug = params.organizationSlug; setTag("organization.slug", organizationSlug); setTag("team.slug", params.teamSlug); const project = await apiService.createProject({ organizationSlug, teamSlug: params.teamSlug, name: params.name, platform: params.platform, }); let clientKey: ClientKey | null = null; try { clientKey = await apiService.createClientKey({ organizationSlug, projectSlug: project.slug, name: "Default", }); } catch (err) { logIssue(err); } let output = `# New Project in **${organizationSlug}**\n\n`; output += `**ID**: ${project.id}\n`; output += `**Slug**: ${project.slug}\n`; output += `**Name**: ${project.name}\n`; if (clientKey) { output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\n\n`; } else { output += "**SENTRY_DSN**: There was an error fetching this value.\n\n"; } output += "# Using this information\n\n"; output += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\n`; output += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\n`; return output; },
  • Input schema definition for the create_project tool, specifying parameters like organizationSlug, teamSlug, name, platform using Zod.
    inputSchema: { organizationSlug: ParamOrganizationSlug, regionUrl: ParamRegionUrl.nullable().default(null), teamSlug: ParamTeamSlug, name: z .string() .trim() .describe( "The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.", ), platform: ParamPlatform.nullable().default(null), },
  • Imports the createProject tool and registers it under the name 'create_project' in the tools index export.
    import createProject from "./create-project"; import updateProject from "./update-project"; import createDsn from "./create-dsn"; import findDsns from "./find-dsns"; import analyzeIssueWithSeer from "./analyze-issue-with-seer"; import searchDocs from "./search-docs"; import getDoc from "./get-doc"; import searchIssues from "./search-issues"; import useSentry from "./use-sentry"; // Default export: object mapping tool names to tools export default { whoami, find_organizations: findOrganizations, find_teams: findTeams, find_projects: findProjects, find_releases: findReleases, get_issue_details: getIssueDetails, get_trace_details: getTraceDetails, get_event_attachment: getEventAttachment, update_issue: updateIssue, search_events: searchEvents, create_team: createTeam, create_project: createProject,
  • Defines the tool name as 'create_project' in the defineTool call.
    name: "create_project",

Other Tools

Related Tools

Latest Blog Posts

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