Purpose
Manage Google Forms through hatch_gws_cli; the vendored Google Workspace CLI is the only implementation path.
Tooling
Use exec to run:
hatch_gws_cli forms <resource> <method> [flags]
Connection management
hatch_gws_cli forms status
hatch_gws_cli forms disconnect
Forms operations
Core patterns:
hatch_gws_cli forms statushatch_gws_cli forms disconnecthatch_gws_cli schema forms.forms.gethatch_gws_cli schema forms.forms.createhatch_gws_cli schema forms.forms.batchUpdatehatch_gws_cli schema forms.forms.responses.listhatch_gws_cli schema forms.forms.responses.get
Common raw API calls:
hatch_gws_cli forms forms get --params '{"formId":"<form_id>"}'hatch_gws_cli forms forms create --json '{"info":{"title":"Feedback Survey","documentTitle":"Feedback Survey"}}'hatch_gws_cli forms forms batchUpdate --params '{"formId":"<form_id>"}' --json '{"requests":[{"updateFormInfo":{"info":{"description":"Quarterly survey"},"updateMask":"description"}}]}'hatch_gws_cli forms forms responses list --params '{"formId":"<form_id>","pageSize":20}'hatch_gws_cli forms forms responses get --params '{"formId":"<form_id>","responseId":"<response_id>"}'
JSON output contract:
status: parsestatus,connect_url, anddisconnect_urldisconnect: parseok,action,status, anddisconnect_url
Auth
Authentication is handled by the wrapper's status and disconnect subcommands. Do not hand-write credential files or run raw gws auth ....
First-use setup flow
- Run
hatch_gws_cli forms status. - If
statusisunavailable, tell the user that Google Forms is not available on this device. Do not offer alternative integration approaches or ask the user for credentials. - If
statusisnot_connectedandconnect_urlis present, replace<connect_url>with the returned URL and share exactly this Markdown link:[Connect Google Forms](<connect_url>); do not paste the raw URL separately. Wait for the user to reconnect. - Once
statusisconnected, proceed with Forms operations.
Operating Rules
- Use
schemabefore unfamiliar Forms methods so--paramsand--jsonmatch the current vendored CLI contract. - Creating a form and editing an unpublished form owned only by the user may proceed from a clear request. Confirm before editing a shared or published form, or publishing one, because its contents can reach other people.
- Run
forms.getbefore presenting response data so you can map question IDs to human-readable form structure. - Treat form IDs and response IDs as opaque strings and only use IDs returned by prior commands or explicit user input.
- Run
hatch_gws_cli forms disconnect. After running it, whendisconnect_urlis present, replace<disconnect_url>with the returned URL and share exactly this Markdown link:[Disconnect Google Forms](<disconnect_url>); do not paste the raw URL separately. - Paginate through responses when the user asks for all responses; stop when
nextPageTokenis absent. - After a read or write action, confirm the user-visible result only. Do not surface raw API identifiers (form, response, and question IDs) or other internal response fields (page tokens/cursors, raw JSON) in text shown to the user unless the user asks for them or you need them to troubleshoot a failure; keep using them internally to chain follow-up commands.
- Response reads retain Google's raw timestamps and add semantic UTC and user-local forms for response creation/submission times.