Google · Capability
Google Drive API — Files
Google Drive API — Files. 12 operations. Lead operation: Google Get Files. Self-contained Naftiko capability covering one Google business surface.
What You Can Do
GET
Googledrivefileslist
— Google Get Files
/v1/files
POST
Googledrivefilescreate
— Google Post Files
/v1/files
GET
Googledrivefilesgenerateids
— Google Get Files Generateids
/v1/files/generateids
DELETE
Googledrivefilesemptytrash
— Google Delete Files Trash
/v1/files/trash
GET
Googledrivefilesget
— Google Get Files Fileid
/v1/files/{fileid}
PATCH
Googledrivefilesupdate
— Google Patch Files Fileid
/v1/files/{fileid}
DELETE
Googledrivefilesdelete
— Google Delete Files Fileid
/v1/files/{fileid}
POST
Googledrivefilescopy
— Google Post Files Fileid Copy
/v1/files/{fileid}/copy
GET
Googledrivefilesexport
— Google Get Files Fileid Export
/v1/files/{fileid}/export
GET
Googledrivefileslistlabels
— Google Get Files Fileid Listlabels
/v1/files/{fileid}/listlabels
POST
Googledrivefilesmodifylabels
— Google Post Files Fileid Modifylabels
/v1/files/{fileid}/modifylabels
POST
Googledrivefileswatch
— Google Post Files Fileid Watch
/v1/files/{fileid}/watch
MCP Tools
google-get-files
Google Get Files
read-only
idempotent
google-post-files
Google Post Files
google-get-files-generateids
Google Get Files Generateids
read-only
idempotent
google-delete-files-trash
Google Delete Files Trash
idempotent
google-get-files-fileid
Google Get Files Fileid
read-only
idempotent
google-patch-files-fileid
Google Patch Files Fileid
idempotent
google-delete-files-fileid
Google Delete Files Fileid
idempotent
google-post-files-fileid-copy
Google Post Files Fileid Copy
google-get-files-fileid-export
Google Get Files Fileid Export
read-only
idempotent
google-get-files-fileid-listlabels
Google Get Files Fileid Listlabels
read-only
idempotent
google-post-files-fileid-modifylabels
Google Post Files Fileid Modifylabels
google-post-files-fileid-watch
Google Post Files Fileid Watch
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Google Drive API — Files
description: 'Google Drive API — Files. 12 operations. Lead operation: Google Get Files. Self-contained Naftiko capability
covering one Google business surface.'
tags:
- Google
- Files
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
GOOGLE_API_KEY: GOOGLE_API_KEY
capability:
consumes:
- type: http
namespace: drive-files
baseUri: https://www.googleapis.com/drive/v3
description: Google Drive API — Files business capability. Self-contained, no shared references.
resources:
- name: files
path: /files
operations:
- name: googledrivefileslist
method: GET
description: Google Get Files
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: corpora
in: query
type: string
description: Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain',
'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allD
- name: corpus
in: query
type: string
description: 'Deprecated: The source of files to list. Use ''corpora'' instead.'
- name: driveId
in: query
type: string
description: ID of the shared drive to search.
- name: includeItemsFromAllDrives
in: query
type: boolean
description: Whether both My Drive and shared drive items should be included in results.
- name: includeLabels
in: query
type: string
description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- name: includePermissionsForView
in: query
type: string
description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- name: includeTeamDriveItems
in: query
type: boolean
description: 'Deprecated: Use `includeItemsFromAllDrives` instead.'
- name: orderBy
in: query
type: string
description: A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime',
'name', 'name_natural', 'quotaBytesUsed', 'rece
- name: pageSize
in: query
type: integer
description: The maximum number of files to return per page. Partial or empty result pages are possible even before
the end of the files list has been reached.
- name: pageToken
in: query
type: string
description: The token for continuing a previous list request on the next page. This should be set to the value
of 'nextPageToken' from the previous response.
- name: q
in: query
type: string
description: A query for filtering the file results. See the "Search for files & folders" guide for supported syntax.
- name: spaces
in: query
type: string
description: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: teamDriveId
in: query
type: string
description: 'Deprecated: Use `driveId` instead.'
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: googledrivefilescreate
method: POST
description: Google Post Files
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: enforceSingleParent
in: query
type: boolean
description: Deprecated. Creating files in multiple folders is no longer supported.
- name: ignoreDefaultVisibility
in: query
type: boolean
description: Whether to ignore the domain's default visibility settings for the created file. Domain administrators
can choose to make all uploaded files visible to the doma
- name: includeLabels
in: query
type: string
description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- name: includePermissionsForView
in: query
type: string
description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- name: keepRevisionForever
in: query
type: boolean
description: Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with
binary content in Google Drive. Only 200 revisions for th
- name: ocrLanguage
in: query
type: string
description: A language hint for OCR processing during image import (ISO 639-1 code).
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: useContentAsIndexableText
in: query
type: boolean
description: Whether to use the uploaded content as indexable text.
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: files-generateIds
path: /files/generateIds
operations:
- name: googledrivefilesgenerateids
method: GET
description: Google Get Files Generateids
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: count
in: query
type: integer
description: The number of IDs to return.
- name: space
in: query
type: string
description: 'The space in which the IDs can be used to create new files. Supported values are ''drive'' and ''appDataFolder''.
(Default: ''drive'')'
- name: type
in: query
type: string
description: 'The type of items which the IDs can be used for. Supported values are ''files'' and ''shortcuts''.
Note that ''shortcuts'' are only supported in the `drive` ''space''. '
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: files-trash
path: /files/trash
operations:
- name: googledrivefilesemptytrash
method: DELETE
description: Google Delete Files Trash
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: driveId
in: query
type: string
description: If set, empties the trash of the provided shared drive.
- name: enforceSingleParent
in: query
type: boolean
description: 'Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself
is not, the item will be placed under its owner''s root.'
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: files-fileId
path: /files/{fileId}
operations:
- name: googledrivefilesget
method: GET
description: Google Get Files Fileid
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID of the file.
required: true
- name: acknowledgeAbuse
in: query
type: boolean
description: Whether the user is acknowledging the risk of downloading known malware or other abusive files. This
is only applicable when alt=media.
- name: includeLabels
in: query
type: string
description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- name: includePermissionsForView
in: query
type: string
description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: googledrivefilesupdate
method: PATCH
description: Google Patch Files Fileid
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID of the file.
required: true
- name: addParents
in: query
type: string
description: A comma-separated list of parent IDs to add.
- name: enforceSingleParent
in: query
type: boolean
description: 'Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead.'
- name: includeLabels
in: query
type: string
description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- name: includePermissionsForView
in: query
type: string
description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- name: keepRevisionForever
in: query
type: boolean
description: Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with
binary content in Google Drive. Only 200 revisions for th
- name: ocrLanguage
in: query
type: string
description: A language hint for OCR processing during image import (ISO 639-1 code).
- name: removeParents
in: query
type: string
description: A comma-separated list of parent IDs to remove.
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: useContentAsIndexableText
in: query
type: boolean
description: Whether to use the uploaded content as indexable text.
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: googledrivefilesdelete
method: DELETE
description: Google Delete Files Fileid
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID of the file.
required: true
- name: enforceSingleParent
in: query
type: boolean
description: 'Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself
is not, the item will be placed under its owner''s root.'
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: files-fileId-copy
path: /files/{fileId}/copy
operations:
- name: googledrivefilescopy
method: POST
description: Google Post Files Fileid Copy
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID of the file.
required: true
- name: enforceSingleParent
in: query
type: boolean
description: Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.
- name: ignoreDefaultVisibility
in: query
type: boolean
description: Whether to ignore the domain's default visibility settings for the created file. Domain administrators
can choose to make all uploaded files visible to the doma
- name: includeLabels
in: query
type: string
description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- name: includePermissionsForView
in: query
type: string
description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- name: keepRevisionForever
in: query
type: boolean
description: Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with
binary content in Google Drive. Only 200 revisions for th
- name: ocrLanguage
in: query
type: string
description: A language hint for OCR processing during image import (ISO 639-1 code).
- name: supportsAllDrives
in: query
type: boolean
description: Whether the requesting application supports both My Drives and shared drives.
- name: supportsTeamDrives
in: query
type: boolean
description: 'Deprecated: Use `supportsAllDrives` instead.'
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: files-fileId-export
path: /files/{fileId}/export
operations:
- name: googledrivefilesexport
method: GET
description: Google Get Files Fileid Export
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID of the file.
required: true
- name: mimeType
in: query
type: string
description: Required. The MIME type of the format requested for this export.
required: true
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your project and provides you with API access, quota, and reports.
Required unless you provide an OAuth 2.0 token.
- name: oauth_token
in: query
type: string
description: OAuth 2.0 token for the current user.
- name: prettyPrint
in: query
type: boolean
description: Returns response with indentations and line breaks.
- name: quotaUser
in: query
type: string
description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned
to a user, but should not exceed 40 characters.
- name: upload_protocol
in: query
type: string
description: Upload protocol for media (e.g. "raw", "multipart").
- name: uploadType
in: query
type: string
description: Legacy upload protocol for media (e.g. "media", "multipart").
- name: files-fileId-listLabels
path: /files/{fileId}/listLabels
operations:
- name: googledrivefileslistlabels
method: GET
description: Google Get Files Fileid Listlabels
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fileId
in: path
type: string
description: The ID for the file.
required: true
- name: maxResults
in: query
type: integer
description: The maximum number of labels to return per page. When not set, defaults to 100.
- name: pageToken
in: query
type: string
description: The token for continuing a previous list request on the next page. This should be set to the value
of 'nextPageToken' from the previous response.
- name: Authorization
in: header
type: string
- name: $.xgafv
in: query
type: string
description: V1 error format.
- name: access_token
in: query
type: string
description: OAuth access token.
- name: alt
in: query
type: string
description: Data format for response.
- name: callback
in: query
type: string
description: JSONP
- name: fields
in: query
type: string
description: Selector specifying which fields to include in a partial response.
- name: key
in: query
type: string
description: API key. Your API key identifies your proje
# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google/refs/heads/main/capabilities/drive-files.yaml