Skip to content

Conversation

@jck411
Copy link
Owner

@jck411 jck411 commented Nov 15, 2025

Refactor Google Drive tools to return structured JSON outputs to improve programmatic parsing by LLM clients.

Previously, Drive tools returned human-formatted strings, which are difficult for LLMs to reliably parse. This PR introduces helper functions (_success_response, _error_response, _format_drive_item, etc.) to ensure all tool outputs are consistent JSON objects with ok, data, and error fields, making them machine-friendly.


Open in Cursor Open in Web

This commit refactors the Google Drive tool to return structured JSON responses for both success and error cases. It also enhances error handling, provides more detailed error messages, and improves the formatting of returned data.

Co-authored-by: jck411 <jck411@gmail.com>
@cursor
Copy link

cursor bot commented Nov 15, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: jck411 <jck411@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants