List Drive Files
Immutable Catalog + Curated Guide
This lossless descriptor comes from the active Portal catalog and is enhanced with reviewed examples.
- Contract tier:
agent_ready - Risk:
read - Catalog version:
google-2026.07.12.2 - Descriptor hash:
8c109d8c21e61d9e38426897a9f4ece514fda28ac9ff7d4d35ff716e38956dec
List files and folders in Google Drive with optional query filters.
Request Body
{
"jsonrpc": "2.0",
"id": "google-drive-list-files-example",
"method": "tools/call",
"params": {
"name": "google.drive_list_files",
"arguments": {
"query": "name contains 'Q1' and mimeType='application/pdf'",
"limit": 25
}
}
}
Arguments Schema
{
"type": "object",
"title": "drive_list_filesArguments",
"properties": {
"query": {
"type": "string",
"title": "Query",
"default": "",
"description": "Provider query string used to filter results."
},
"fields": {
"type": "string",
"title": "Fields",
"default": "",
"description": "Optional Google partial-response fields selector for compact output."
},
"order_by": {
"type": "string",
"title": "Order By",
"default": "",
"description": "Optional provider order expression."
},
"page_size": {
"type": "integer",
"title": "Page Size",
"default": 100,
"description": "Maximum number of items to request from Google for this page."
},
"page_token": {
"type": "string",
"title": "Page Token",
"default": "",
"description": "Provider pagination token returned by a previous list call."
}
},
"additionalProperties": false
}
Output Schema
{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the local or Google provider operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Bounded local navigation or Google provider result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe timing, pagination, cache, request, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe structured error when ok is false."
}
},
"description": "Google MCP normalized operation envelope.",
"additionalProperties": false
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "google-drive-list-files-example",
"method": "tools/call",
"params": {
"name": "google.drive_list_files",
"arguments": {
"query": "name contains '\''Q1'\'' and mimeType='\''application/pdf'\''",
"limit": 25
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "google-drive-list-files-example",
"method": "tools/call",
"params": {
"name": "google.drive_list_files",
"arguments": {
"query": "name contains 'Q1' and mimeType='application/pdf'",
"limit": 25
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "google-drive-list-files-example",
"method": "tools/call",
"params": {
"name": "google.drive_list_files",
"arguments": {
"query": "name contains 'Q1' and mimeType='application/pdf'",
"limit": 25
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 401 Consent Required
{
"ok": true,
"files": [
{
"id": "1AbCdEf",
"name": "Q1 Strategy Brief.pdf",
"mimeType": "application/pdf"
}
]
}
{
"ok": false,
"classification": "missing_required_credentials",
"message": "Google user consent is required."
}