Skip to content

[Bug]: GOOGLEDRIVE_CREATE_FOLDER drops the Google Drive fields parameter, so webViewLink can never be returned #3860

Description

@theguylivnat

SDK Language

Python SDK (composio)

SDK Version

composio==0.13.1

Runtime Environment

Python 3.11

Environment

Production Deployment

Describe the Bug

GOOGLEDRIVE_CREATE_FOLDER cannot return webViewLink (or any other maskable Drive File field), because the action does not expose the Google Drive fields parameter that files.create uses to control the returned field set.

Google Drive's files.create returns only a minimal default projection (id, name, mimeType, kind) unless the caller passes a fields mask (e.g. fields=id,name,webViewLink). The sibling action GOOGLEDRIVE_CREATE_FILE does expose a fields input parameter and forwards it to Google, so it can return webViewLink. GOOGLEDRIVE_CREATE_FOLDER (and GOOGLEDRIVE_CREATE_FILE_FROM_TEXT) omit fields entirely, so there is no way to request webViewLink — the real response never contains it.

This is inconsistent within the same toolkit version: two create actions on the same resource type disagree on whether the Google-native fields parameter is forwarded.

Steps to Reproduce

  1. Fetch the tool schema for GOOGLEDRIVE_CREATE_FILE — note it has a fields input parameter.
  2. Fetch the tool schema for GOOGLEDRIVE_CREATE_FOLDER — note its only inputs are name and parent_id; there is no fields parameter.
  3. Execute GOOGLEDRIVE_CREATE_FOLDER and inspect the response data — it contains id, name, mimeType, kind but never webViewLink, with no way to request it.

Minimal Reproducible Example

from composio import Composio

composio = Composio()

# CREATE_FILE exposes `fields` and can return webViewLink:
file_schema = composio.tools.get(slug="GOOGLEDRIVE_CREATE_FILE")
# -> input params include: name, fields, parents, starred, mimeType, description, file_to_upload

# CREATE_FOLDER does NOT expose `fields`:
folder_schema = composio.tools.get(slug="GOOGLEDRIVE_CREATE_FOLDER")
# -> input params are only: name, parent_id

result = composio.tools.execute(
    slug="GOOGLEDRIVE_CREATE_FOLDER",
    user_id="<user>",
    arguments={"name": "Example Folder", "parent_id": "root"},
)
assert "webViewLink" not in result["data"]  # passes — it is never returned

Error Output / Stack Trace

# No exception is raised. The response is silently missing webViewLink:
{
  "data": {
    "id": "1AbC...",
    "name": "Example Folder",
    "mimeType": "application/vnd.google-apps.folder",
    "kind": "drive#file"
  },
  "successful": true,
  "error": null
}

Reproducibility

  • Always reproducible
  • Intermittent / Sometimes
  • Happened once, can't reproduce

Additional Context or Screenshots

Suggested fix (either would resolve it):

  1. Add a fields input parameter to GOOGLEDRIVE_CREATE_FOLDER (and GOOGLEDRIVE_CREATE_FILE_FROM_TEXT) and forward it to Google's files.create, matching GOOGLEDRIVE_CREATE_FILE; or
  2. Default the create-family actions to request a full/expanded fields mask server-side so webViewLink and other standard File fields are returned by default.

The action's declared output schema advertises webViewLink, webContentLink, thumbnailLink, etc., but these can never be populated under the current input schema — so the declared output over-promises relative to what the action can actually return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportNeeds support team follow-up

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions