List Drive Files
Catalog + Curated
This page is generated from the full broker catalog and enhanced with curated examples.
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",
"properties": {
"query": {
"type": "string"
},
"limit": {
"type": "number",
"minimum": 1,
"maximum": 200
}
},
"additionalProperties": false
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://madpanda3d.com/lab/mad-mcps/portal/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://madpanda3d.com/lab/mad-mcps/portal/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://madpanda3d.com/lab/mad-mcps/portal/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."
}