You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0131c39
Browse filesBrowse the repository at this point in the historyBrowse files
feat(tool/conversational-analytics-list-accessible-data-agents): return all data agents and support manual paging (#4066)
## Description
list_data_agents issued a single dataAgents:listAccessible request and
returned the raw response, so projects with more agents than one page
silently received a truncated list plus a nextPageToken the caller had
no parameter to act on.
- Add optional page_size and page_token parameters; when either is set
the tool returns that single page unchanged.
- When both are omitted, drain every page and return the merged list,
bounded by 1000 agents / 100 pages / 5 minutes. A nextPageToken is
returned only when a bound stopped the drain early.
- Preserve extra top-level fields (e.g. unreachable) by concatenating
their JSON arrays across pages, and stop when the API repeats a page
token.
- Propagate ctx into every request and surface a paging hint on drain
timeout.
- Update the prebuilt config description and tool docs.
## PR Checklist
> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:
- [ ] Make sure you reviewed
[CONTRIBUTING.md](https://github.com/googleapis/mcp-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a
[bug/issue](https://github.com/googleapis/mcp-toolbox/issues/new/choose)
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
- [ ] Ensure you have manually reviewed the entire diff before
requesting a
review
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change
🛠️ Fixes #
Copy file name to clipboardExpand all lines: docs/en/integrations/cloudgda/tools/conversational-analytics-list-accessible-data-agents.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,19 @@ aliases:
13
13
A `conversational-analytics-list-accessible-data-agents` tool allows you to list
14
14
data agents that are accessible.
15
15
16
+
The Conversational Analytics API returns accessible data agents one page at a
17
+
time. By default this tool hides that: it follows every page itself and returns
18
+
all accessible data agents in a single response. Set `page_size` or `page_token`
19
+
to take over pagination and receive one page at a time instead.
20
+
16
21
It's compatible with the following sources:
17
22
18
23
- cloud-gemini-data-analytics
19
24
20
-
`conversational-analytics-list-accessible-data-agents` does not accept any parameters.
25
+
`conversational-analytics-list-accessible-data-agents` accepts the following parameters:
26
+
27
+
-**`page_size`** (optional): The maximum number of data agents to return in this call. Must be a positive integer. Only set this to page through the results manually; when both `page_size` and `page_token` are omitted, every page is fetched automatically.
28
+
-**`page_token`** (optional): A `nextPageToken` returned by a previous call, used to fetch the next page. Only set this to page through the results manually.
Copy file name to clipboardExpand all lines: internal/tools/conversationalanalytics/conversationalanalyticslistaccessibledataagents/conversationalanalyticslistaccessibledataagents.go
"Optional. The maximum number of data agents to return in this call. Must be a positive integer. Only set this to page through the results manually: when both `page_size` and `page_token` are omitted, every page is fetched automatically and all accessible data agents are returned.",
99
+
parameters.WithIntRequired(false),
100
+
parameters.WithIntMinValue(&minPageSizeValue),
101
+
),
102
+
parameters.NewStringParameter(
103
+
"page_token",
104
+
"Optional. A page token returned as `nextPageToken` by a previous call, used to fetch the next page. Only set this to page through the results manually; omit it to fetch all accessible data agents at once.",
0 commit comments