Skip to main content
Glama
taylorwilsdon

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

get_form

Retrieve detailed form information including title, description, questions, and URLs from Google Workspace by providing the user's email address and form ID.

Instructions

Get a form.

Args:
    user_google_email (str): The user's Google email address. Required.
    form_id (str): The ID of the form to retrieve.

Returns:
    str: Form details including title, description, questions, and URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_idYes
serviceYes
user_google_emailYes

Implementation Reference

  • The main execution logic for the 'get_form' MCP tool, decorated with registration (@server.tool()), error handling, and auth requirements. Retrieves Google Form details by ID and returns formatted summary.
    @server.tool()
    @handle_http_errors("get_form", is_read_only=True, service_type="forms")
    @require_google_service("forms", "forms")
    async def get_form(
        service,
        user_google_email: str,
        form_id: str
    ) -> str:
        """
        Get a form.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            form_id (str): The ID of the form to retrieve.
    
        Returns:
            str: Form details including title, description, questions, and URLs.
        """
        logger.info(f"[get_form] Invoked. Email: '{user_google_email}', Form ID: {form_id}")
    
        form = await asyncio.to_thread(
            service.forms().get(formId=form_id).execute
        )
    
        form_info = form.get("info", {})
        title = form_info.get("title", "No Title")
        description = form_info.get("description", "No Description")
        document_title = form_info.get("documentTitle", title)
    
        edit_url = f"https://docs.google.com/forms/d/{form_id}/edit"
        responder_url = form.get("responderUri", f"https://docs.google.com/forms/d/{form_id}/viewform")
    
        items = form.get("items", [])
        questions_summary = []
        for i, item in enumerate(items, 1):
            item_title = item.get("title", f"Question {i}")
            item_type = item.get("questionItem", {}).get("question", {}).get("required", False)
            required_text = " (Required)" if item_type else ""
            questions_summary.append(f"  {i}. {item_title}{required_text}")
    
        questions_text = "\n".join(questions_summary) if questions_summary else "  No questions found"
    
        result = f"""Form Details for {user_google_email}:
    - Title: "{title}"
    - Description: "{description}"
    - Document Title: "{document_title}"
    - Form ID: {form_id}
    - Edit URL: {edit_url}
    - Responder URL: {responder_url}
    - Questions ({len(items)} total):
    {questions_text}"""
    
        logger.info(f"Successfully retrieved form for {user_google_email}. ID: {form_id}")
        return result
  • Registers the get_form tool with the MCP server.
    @server.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is a 'Get' operation which implies read-only behavior, but doesn't mention authentication requirements, rate limits, error conditions, or whether this requires specific permissions. For a tool with 3 required parameters and no annotation coverage, this is insufficient behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Returns) and gets straight to the point. It's appropriately sized for a simple retrieval tool - no wasted words, though it could potentially be more concise by combining some information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a retrieval tool with 3 parameters and no output schema, the description covers the basic purpose and parameters adequately. However, without annotations and with no output schema, it should ideally provide more detail about the return format, error handling, or authentication requirements to be truly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining all 3 parameters in the Args section. It clarifies that 'user_google_email' is required and identifies the user, 'form_id' identifies which form to retrieve, and the Returns section explains what data will be returned. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get a form' which is a clear verb+resource combination, but it's quite generic and doesn't differentiate from sibling tools like 'get_form_response' or 'list_form_responses'. It specifies what information is returned, which adds some specificity beyond just the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives like 'list_form_responses' or 'get_form_response'. The description only states what the tool does, not when it's appropriate or what distinguishes it from similar tools in the same server.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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