Return type standardization
This commit is contained in:
@@ -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)}]
|
||||
|
||||
Reference in New Issue
Block a user