Add pagination for list_fme_workspaces#35
Open
joe-hagerman wants to merge 1 commit intoharness:masterfrom
Open
Add pagination for list_fme_workspaces#35joe-hagerman wants to merge 1 commit intoharness:masterfrom
joe-hagerman wants to merge 1 commit intoharness:masterfrom
Conversation
joe-hagerman
commented
Mar 3, 2026
- Added pagination support to list_fme_workspaces tool by exposing the offset and limit query parameters supported by the underlying Split.io API (GET /internal/api/v2/workspaces)
- Updated FMEService.ListWorkspaces client method to accept offset and limit int parameters and pass them as query params
- Added optional offset and count number parameters to the list_fme_workspaces MCP tool definition; defaults to count=20 if not provided, capped at a maximum of 1000 per the Split.io API documentation
- Updated README to document the new pagination parameters for list_fme_workspaces
| // ListWorkspaces retrieves FME workspaces with pagination support. | ||
| // GET https://api.split.io/internal/api/v2/workspaces | ||
| func (f *FMEService) ListWorkspaces(ctx context.Context) (*dto.FMEWorkspacesResponse, error) { | ||
| // offset specifies the number of items to skip; limit controls how many items to return (max 100). |
Contributor
There was a problem hiding this comment.
looks to be max 1000
| mcp.WithNumber("offset", | ||
| mcp.Description("The number of workspaces to skip for pagination (default: 0)"), | ||
| ), | ||
| mcp.WithNumber("count", |
Contributor
There was a problem hiding this comment.
nit: We could use "limit" to keep naming consistent with the API. Feel free to ignore this though
| ), | ||
| func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { | ||
| workspaces, err := fmeService.ListWorkspaces(ctx) | ||
| offset, err := OptionalIntParam(request, "offset") |
Contributor
There was a problem hiding this comment.
check for negative offset?
Contributor
|
Thank you for the suggestions! I can take things from here and get this implemented. |
thisrohangupta
added a commit
to thisrohangupta/harness-mcp-v2
that referenced
this pull request
Mar 6, 2026
Adds offset and limit query params to the FME workspace list endpoint, matching the Split.io API (GET /internal/api/v2/workspaces). Users can pass offset and size params via harness_list. Parity with harness/mcp-server#35. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
thisrohangupta
added a commit
to thisrohangupta/harness-mcp-v2
that referenced
this pull request
Mar 6, 2026
feat: add pagination to fme_workspace list (parity with harness/mcp-server#35)
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
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.