Copilot commented on code in PR #41698:
URL: https://github.com/apache/superset/pull/41698#discussion_r3555205840


##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -461,15 +461,32 @@ class DashboardInfo(BaseModel):
     changed_on_humanized: str | None = None
     chart_count: int = 0
     tags: List[TagInfo] = Field(default_factory=list)
-    charts: List[DashboardChartSummary] = Field(default_factory=list)
+    charts: List[DashboardChartSummary] = Field(
+        default_factory=list,
+        description=(
+            "Charts on this dashboard. May be capped below chart_count "
+            "(default cap: MCP_RESPONSE_SIZE_CONFIG['max_list_items'], 100 "
+            "items) when the full response would exceed the token budget. "
+            "Compare len(charts) to chart_count to detect this. For "
+            "dashboards with more charts than the cap, call list_charts "
+            "with filters=[{'col': 'dashboards', 'opr': 'eq', "
+            "'value': <this dashboard's id>}] and page through with "
+            "page/page_size to retrieve the complete list regardless of "
+            "size."
+        ),

Review Comment:
   The `charts` field description hardcodes the default cap as “100 items” 
while also stating it’s controlled by 
`MCP_RESPONSE_SIZE_CONFIG['max_list_items']`. This can become stale if the 
default changes again, and it’s a bit ambiguous (is the cap 100 or 
config-driven?). Consider removing the hardcoded number or deriving it from the 
constant/config so the documentation can’t drift.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to