feat(confluence): add all missing Confluence tools#3355
feat(confluence): add all missing Confluence tools#3355waleedlatif1 wants to merge 16 commits intomainfrom
Conversation
…scendants, permissions, and properties Add 16 new Confluence operations: list/get/update tasks, update/delete blog posts, create/update/delete spaces, get page descendants, list space permissions, list/create/delete space properties. Includes API routes, tool definitions, block config wiring, OAuth scopes, and generated docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The OAuth authorization flow uses scopes from auth.ts, not oauth.ts. The 9 new scopes were only added to oauth.ts and the block config but not to the actual provider config in auth.ts, causing re-auth to still return tokens without the new scopes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove apostrophe from description that caused MDX generation to truncate at the escape character. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move get_user from GET to POST to avoid exposing access token in URL - Add 400 validation for missing params in space-properties create/delete - Add null check for blog post version before update to prevent TypeError Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add type and depth fields to page descendants (from Confluence API) - Add body field (storage format) to task list/get/update responses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
validateAlphanumericId rejects valid Atlassian account IDs that contain colons (e.g. 557058:6b9c9931-4693-49c1-8b3a-931f1af98134). Use validatePathSegment with a custom pattern allowing colons instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return 400 when neither name nor description is provided for space update, instead of sending an empty body to the Confluence API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…list_tasks pagination - Remove create_space from spaceId condition array since creating a space doesn't require a space ID input - Remove list_tasks from generic supportsCursor array so it uses its dedicated handler that correctly passes assignedTo and status filters during pagination Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this param, the Confluence v2 API does not return body content, causing the fallback to erase existing content when only updating the title. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same bug class as the blogpost fix — without this param, the Confluence v2 API does not return body content, causing the fallback to erase page content when only updating the title. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Confluence v2 PUT /spaces/{id} endpoint requires the name field.
When the user only provides a description update, fetch the current
space first to preserve the existing name.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ], | ||
| value: () => 'complete', | ||
| condition: { field: 'operation', value: 'update_task' }, | ||
| }, |
There was a problem hiding this comment.
List tasks status filter missing in block UI
Medium Severity
The list_tasks operation supports filtering by status (complete/incomplete) in the API, and the PR fixed pagination to preserve this filter, but the block UI only shows the "Assigned To" filter for list_tasks. The taskStatus field is shown only for update_task, so users cannot filter tasks by status when listing from the block.
| 'list_space_permissions', | ||
| 'list_space_properties', | ||
| 'create_space_property', | ||
| 'delete_space_property', |
There was a problem hiding this comment.
List tasks pageId and spaceId filters missing in block UI
Low Severity
The list_tasks operation supports optional pageId and spaceId filters in the API, but the block UI does not expose them. The spaceId field condition omits list_tasks, and the manualPageId field uses not: true with list_tasks in its exclusion list, so both inputs are hidden when listing tasks. Users cannot filter tasks by page or space from the block.
Greptile SummaryThis PR significantly expands Confluence integration by adding 14 new tools and fixing several critical bugs that could cause data loss. New Tools Added:
Critical Bug Fixes:
OAuth & Configuration:
Implementation Quality:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Start[User Selects Confluence Tool] --> OAuth{OAuth Required?}
OAuth -->|Yes| CheckScopes[Check OAuth Scopes]
CheckScopes --> AuthConfig[auth.ts & oauth.ts<br/>Define Required Scopes]
AuthConfig --> Modal[OAuth Modal Shows<br/>Scope Descriptions]
Modal --> Authorized[User Authorizes]
OAuth -->|Cached Token| ToolDef[Tool Definition]
Authorized --> ToolDef
ToolDef --> Registry[tools/registry.ts<br/>Tool Registry Lookup]
Registry --> BlockConfig[blocks/confluence.ts<br/>Block Configuration]
BlockConfig --> APIRoute[API Route Handler<br/>app/api/tools/confluence/]
APIRoute --> Validate[Input Validation<br/>validateAlphanumericId<br/>validateJiraCloudId<br/>validatePathSegment]
Validate --> Auth[Auth Check<br/>checkSessionOrInternalAuth]
Auth --> CloudID{CloudId<br/>Provided?}
CloudID -->|No| FetchCloud[Fetch from Domain]
CloudID -->|Yes| CallAPI
FetchCloud --> CallAPI[Call Confluence API]
CallAPI --> NewTools[14 New Tools:<br/>Tasks, Blog Posts, Spaces,<br/>Space Properties, Permissions,<br/>Page Descendants, User]
CallAPI --> BugFixes[Bug Fixes:<br/>body-format=storage<br/>pagination filters<br/>space name requirement]
NewTools --> Response[Transform Response]
BugFixes --> Response
Response --> Output[Return to User]
Last reviewed commit: 8b2a917 |


Summary
Type of Change
Testing
Tested manually
Checklist