Google Docs

GoogleDocs_SearchAndRetrieveDocuments

Searches for documents in the user's Google Drive and returns documents with their main body content and tab metadata. Excludes documents that are in the trash. Returns main body content only with metadata about tabs. Use get_document_as_docmd() to retrieve full tab content for specific documents. Use search_documents() for metadata-only searches.

Remote googledocs

Remote (network-hosted)

Other tools also called GoogleDocs_SearchAndRetrieveDocuments? See providers with this name

Input Schema


            {
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "description": "The number of documents to search and retrieve (max 50). Defaults to 10."
    },
    "order_by": {
      "type": "array",
      "items": {
        "enum": [
          "createdTime",
          "createdTime desc",
          "folder",
          "folder desc",
          "modifiedByMeTime",
          "modifiedByMeTime desc",
          "modifiedTime",
          "modifiedTime desc",
          "name",
          "name desc",
          "name_natural",
          "name_natural desc",
          "quotaBytesUsed",
          "quotaBytesUsed desc",
          "recency",
          "recency desc",
          "sharedWithMeTime",
          "sharedWithMeTime desc",
          "starred",
          "starred desc",
          "viewedByMeTime",
          "viewedByMeTime desc"
        ],
        "type": "string"
      },
      "description": "Sort order. Defaults to listing the most recently modified documents first"
    },
    "return_format": {
      "enum": [
        "docmd",
        "markdown",
        "html",
        "google_api_json"
      ],
      "type": "string",
      "description": "The format of the document to return. Defaults to Markdown."
    },
    "pagination_token": {
      "type": "string",
      "description": "The pagination token to continue a previous request"
    },
    "document_contains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Keywords or phrases that must be in the document title or body. Provide a list of keywords or phrases if needed."
    },
    "document_not_contains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Keywords or phrases that must NOT be in the document title or body. Provide a list of keywords or phrases if needed."
    },
    "include_shared_drives": {
      "type": "boolean",
      "description": "Whether to include documents from shared drives. Defaults to False (searches only in the user's 'My Drive')."
    },
    "search_only_in_shared_drive_id": {
      "type": "string",
      "description": "The ID of the shared drive to restrict the search to. If provided, the search will only return documents from this drive. Defaults to None, which searches across all drives."
    },
    "include_organization_domain_documents": {
      "type": "boolean",
      "description": "Whether to include documents from the organization's domain. This is applicable to admin users who have permissions to view organization-wide documents in a Google Workspace account. Defaults to False."
    }
  }
}