Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

set_publish_settings

Update Google Forms publish settings to control template publishing and authentication requirements for viewing or submission.

Instructions

Updates the publish settings of a form. Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form to update publish settings for. publish_as_template (bool): Whether to publish as a template. Defaults to False. require_authentication (bool): Whether to require authentication to view/submit. Defaults to False. Returns: str: Confirmation message of the successful publish settings update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_idYes
publish_as_templateNo
require_authenticationNo
serviceYes
user_google_emailYes

Implementation Reference

  • The main handler function for the 'set_publish_settings' MCP tool. It is decorated with @server.tool() for registration, updates Google Form publish settings via the Forms API, handles authentication, and returns a confirmation message.
    @server.tool() @handle_http_errors("set_publish_settings", service_type="forms") @require_google_service("forms", "forms") async def set_publish_settings( service, user_google_email: str, form_id: str, publish_as_template: bool = False, require_authentication: bool = False ) -> str: """ Updates the publish settings of a form. Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form to update publish settings for. publish_as_template (bool): Whether to publish as a template. Defaults to False. require_authentication (bool): Whether to require authentication to view/submit. Defaults to False. Returns: str: Confirmation message of the successful publish settings update. """ logger.info(f"[set_publish_settings] Invoked. Email: '{user_google_email}', Form ID: {form_id}") settings_body = { "publishAsTemplate": publish_as_template, "requireAuthentication": require_authentication } await asyncio.to_thread( service.forms().setPublishSettings(formId=form_id, body=settings_body).execute ) confirmation_message = f"Successfully updated publish settings for form {form_id} for {user_google_email}. Publish as template: {publish_as_template}, Require authentication: {require_authentication}" logger.info(f"Publish settings updated successfully for {user_google_email}. Form ID: {form_id}") return confirmation_message

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/taylorwilsdon/google_workspace_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server