Skip to content

feat(tools): Add project management tools#1147

Merged
dcramer merged 10 commits into
mainfrom
refine-project-management-tools
Jul 3, 2026
Merged

feat(tools): Add project management tools#1147
dcramer merged 10 commits into
mainfrom
refine-project-management-tools

Conversation

@dcramer

@dcramer dcramer commented Jul 3, 2026

Copy link
Copy Markdown
Member

Project management is now a catalog-scoped skill with tools to create projects, update project metadata, and manage team access. create_project always returns a usable SENTRY_DSN, can link an existing repository by creating a root code mapping, and preflights repository matches before writing a project. update_project is limited to metadata, while add_team_to_project and remove_team_from_project handle team access with duplicate and last-team safeguards.

The Sentry API helpers now cover project team pagination, active client-key selection, repository lookup, and organization bulk code-mapping creation. Specs, docs, mocks, and client tests were updated with the implementation, and Sentry API mocks are scoped to Sentry hosts instead of wildcard domains.

Agents should migrate team membership changes away from update_project to the explicit team-access tools. The stdio CLI also accepts --all-skills for local access to catalog skills during development.

dcramer and others added 7 commits July 2, 2026 18:36
Add the OpenSpec proposal, design, requirements, and task list for tightening project creation, splitting metadata updates from team access changes, and documenting the project-management capability.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Add API client support for project creation slugs and project team membership reads/removals. Mark the API-client OpenSpec tasks complete after verifying upstream endpoint contracts.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep create_project focused on project creation and DSN return behavior by removing repository linking, accepting explicit slugs, and reusing existing DSNs before creating a fallback key.

Make update_project metadata-only so team access changes can move to dedicated project-management tools.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Add explicit project-management tools for granting and revoking team access to projects. Keep the add path idempotent from the user perspective and guard removals when the team is not assigned or is the last assigned team.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Hide project creation from project-scoped catalog sessions and cover skill gating, catalog-only exposure, and constraint injection for project-management tools.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Add the durable project-management spec, update stale docs and eval expectations, and add an explicit --all-skills CLI flag for eval harnesses that need active non-deprecated skills.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Create root code mappings through the organization bulk endpoint when a repository is supplied. Keep project creation safe by preflighting repository matches and still returning the project slug and DSN when post-create linking fails.

Tighten project creation around active DSNs, paginate project team lookups, and scope MSW Sentry API handlers to sentry.io instead of wildcard hosts.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
@dcramer
dcramer marked this pull request as ready for review July 3, 2026 03:24
Comment thread packages/mcp-core/src/tools/catalog/create-project.ts Outdated
Keep create_project from throwing after project creation when Sentry key lookup or default key creation fails. Return the created project details with an explicit DSN recovery note instead, while still attempting to create a Default key when key listing fails.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b380912. Configure here.

Comment thread packages/mcp-core/src/tools/catalog/create-project.ts
Comment thread packages/mcp-core/src/tools/catalog/create-project.ts
List organization repositories without narrowing to the caller query before project creation. Prefer exact repository names over suffix matches, and only use suffix matching for shorthand repo inputs so full owner/repo values do not become falsely ambiguous.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>

@sentry-warden sentry-warden Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update_project declares idempotentHint: true but slug renames are not idempotent (packages/mcp-core/src/tools/catalog/update-project.ts:72)

In update_project's annotations, idempotentHint: true is declared, but the tool accepts an optional slug parameter that renames the project. After a successful rename the project is only reachable at the new slug, so a retry of the identical call (still keyed on the original projectSlug) resolves to a missing project and fails rather than being a no-op. Because the safety hint applies to the whole tool and a slug-changing call is not repeatable without a different effect, the hint should be set to false (or removed) to be conservative. Name/platform-only updates remain idempotent, but the hint must reflect the worst-case argument set.

Evidence
  • inputSchema.slug (defined via ParamProjectSlug, lines 62-67) accepts a new slug that renames the project through apiService.updateProject.
  • The handler passes slug: params.slug to updateProject (line 75); on success the project is only addressable at the new slug and projectSlug (old slug) is invalidated.
  • A retry with the same arguments looks up the now-nonexistent old projectSlug, so the second invocation errors instead of being a no-op — contradicting idempotentHint: true at line 72.
  • The tool already declares destructiveHint: true, so the idempotent claim is the inconsistent hint for slug-changing calls.

Identified by Warden mcp-audit

Mark update_project as non-idempotent because slug renames invalidate the old project slug for identical retries. Add a focused test to keep the MCP annotation conservative.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
@dcramer
dcramer merged commit e2da516 into main Jul 3, 2026
22 checks passed
@dcramer
dcramer deleted the refine-project-management-tools branch July 3, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant