Return type standardization

This commit is contained in:
2026-07-27 00:35:20 -07:00
parent baa48d7cec
commit f0e5267828
8 changed files with 47 additions and 48 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ async def handle(args: Dict[str, Any]):
paged_items = all_items[start_idx:end_idx]
if not paged_items:
return {"text": f"No items found on page {page}."}
return [{"type": "text", "text": f"No items found on page {page}."}]
output = []
for item in paged_items:
@@ -61,4 +61,4 @@ async def handle(args: Dict[str, Any]):
header = f"Listing of {path_str}\nPage {effective_page} of {total_pages} ({total_items} total items). Showing {start_idx+1}-{min(end_idx, total_items)}."
return {"text": f"{header}\n\n" + "\n".join(output)}
return [{"type": "text", "text": f"{header}\n\n" + "\n".join(output)}]