-
Notifications
You must be signed in to change notification settings - Fork 796
add support to fetch previous versions of Confluence pages #705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maxheadroom
wants to merge
23
commits into
sooperset:main
Choose a base branch
from
maxheadroom:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add optional version parameter to get_page_content method in pages.py - Update v2_adapter.get_page to support version parameter - Extend confluence server get_page tool with version parameter - Maintains backward compatibility with existing usage - Version parameter only works with page_id, not title/space_key lookup
- Fix line length issues in pages.py and other files - Add proper error handling for version parameter with title/space_key lookup - Maintain backward compatibility for existing API calls
- Add tests for get_page_content with version parameter for both v1 and v2 APIs - Add server-level tests for version parameter in confluence_get_page tool - Add test for error handling when version is used with title/space_key lookup - All tests pass with proper mocking and validation
- Update README.md to mention version support in confluence_get_page tool - Update CLAUDE.md to include version history in Confluence capabilities - Add clear indication of version support in tool descriptions and tables
allow manual trigger of the lint workflow
- Extended ConfluenceVersion model with minor_edit field - Added get_page_versions and get_page_version methods to PagesMixin - Added v2 API support in ConfluenceV2Adapter - Added confluence_get_page_versions MCP tool - Added comprehensive tests for new functionality
- Fixed test_get_page_content_oauth_uses_v2_api to match new v2_adapter signature - Added confluence_get_page_versions to README documentation - Updated tools comparison table
- Updated test expectations to include version=None parameter - All confluence server tests now pass
✅ FEATURE COMPLETE: Added confluence_get_page_versions tool Implementation includes: - Extended ConfluenceVersion model with minor_edit field - Added get_page_versions/get_page_version methods to PagesMixin - Extended ConfluenceV2Adapter with v2 API support - Added confluence_get_page_versions MCP tool - Comprehensive test coverage (all tests passing) - Updated documentation and README - Supports both Cloud (v2 API) and Server/DC (v1 API) - Proper error handling and authentication - Follows MCP specifications and existing code patterns The tool can list all versions or get specific version details for any Confluence page.
- Follows existing naming convention where tool names don't include service prefix - Updated function name, tests, and documentation - Tool is now properly named 'get_page_versions' instead of 'confluence_confluence_get_page_versions' - All tests still pass
- Use proper /rest/api/content/{id}/version endpoint for v1 API
- Add fallback to current version only if versions endpoint fails
- Now correctly returns multiple versions for pages with version history
- All tests still pass
- Add /wiki prefix for Cloud instances in v1 API calls - Now correctly returns multiple versions (tested with real data) - Test shows 2 versions returned instead of just 1 - Add test script for real-world validation
- Add missing return type annotations - Fix TYPE_CHECKING import for ConfluenceVersion - Apply code formatting - All pre-commit checks now pass
- Replace /history endpoint (only returns 2 versions) with /version endpoint - Add pagination support to get all versions (50 per page) - Now correctly returns all 16 versions for test page 1137248511 - Verified with real test data showing complete version history
- Fix trailing whitespace and end-of-file formatting - Apply ruff code formatting - All pre-commit checks now pass
Author
|
Added an explicit "get_page_versions" tool to fetch page history information. This has been tested with Atlassian Cloud. |
- get_page now only returns current version (no version parameter) - get_page_version is the dedicated tool for retrieving specific versions - This eliminates confusion for LLMs about which tool to use - Updated tests to remove version-related test cases - All tests pass and linting is clean Resolves tool overlap where both get_page and get_page_version could return previous versions, making it unclear which tool to use.
- get_page_versions: Only returns list of available versions (no content) - get_page: Returns page content, with optional version parameter for specific versions - Eliminates ambiguous output that confused LLMs - Clear separation: list versions vs get content - Updated tests to reflect new behavior - All tests pass and linting is clean This resolves the confusion where get_page_versions could return either a list of versions OR page content depending on parameters.
- Added new get_page_version tool that fetches a specific version of a Confluence page - Removed version parameter from get_page tool to separate concerns - Updated server tests to include new tool and remove version-related functionality - Updated unit tests to reflect the changes in get_page_content method calls - Tool follows Atlassian API documentation for fetching page versions
- Renamed get_page_versions to list_page_versions for better clarity - Updated all test files and imports to use the new name - Updated function documentation to reflect the rename - Tool is now accessible as confluence_list_page_versions in MCP server
|
This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions! |
nszceta
added a commit
to nszceta/mcp-atlassian
that referenced
this pull request
Oct 16, 2025
…fluence pages (resolving conflicts)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR extends the existing get_page tool with the capability to fetch a Confluence Page previous version. If no version is specified, then the latest version is fetched (current behaviour). Optionally a previous version can be specified and then that version of the page is returned.
This enables LLM use cases like: Compare the latest version of page 12355 with it's version 5 and summarise the changes.
Changes
Testing
Checklist