Skip to content

Instantly share code, notes, and snippets.

@lukehinds
Last active December 21, 2025 10:39
Show Gist options
  • Select an option

  • Save lukehinds/864ccf88de4a612fced406542780845c to your computer and use it in GitHub Desktop.

Select an option

Save lukehinds/864ccf88de4a612fced406542780845c to your computer and use it in GitHub Desktop.
#####################################################################
# Spin Google Workspace Tools Dataset Configuration
#####################################################################
# This configuration demonstrates using Google Workspace MCP tools via Spin
# for generating synthetic productivity assistant training data.
#
# Prerequisites:
# 1. Start the Spin service:
# cd tools-sdk
# spin build && spin up
#
# 2. Import tools from Google Workspace MCP server:
# deepfabric import-tools --transport stdio \
# --command "uvx workspace-mcp --tool-tier complete" \
# --env "GOOGLE_OAUTH_CLIENT_ID=your-client-id" \
# --env "GOOGLE_OAUTH_CLIENT_SECRET=your-secret" \
# --spin http://localhost:3000
#
# 3. Load mock data for realistic responses:
# cd examples/tools-sdk-examples/google-workspace
# ./load-google-workspace-mock-data.sh
#
# 4. Run deepfabric:
# deepfabric start examples/tools-sdk-examples/google-workspace/spin-google-workspace.yaml
#####################################################################
# Topic generation - creates a tree of productivity-related topics
topics:
prompt: "Tasks for a Google Workspace productivity assistant that manages email, calendar, documents, spreadsheets, and tasks for busy professionals"
mode: graph
system_prompt: ""
depth: 3
degree: 4
max_concurrent: 3
save_as: "google-workspace-topics.jsonl"
llm:
provider: "gemini"
model: "gemini-2.5-flash"
temperature: 0.8
# Data generation with Google Workspace tool execution
generation:
system_prompt: |
You are a Google Workspace productivity assistant helping professionals manage their work efficiently.
You have access to tools across Gmail, Google Drive, Calendar, Docs, Sheets, Slides, Forms, Tasks, and Chat.
When helping users:
EMAIL (Gmail):
- Use search_gmail_messages to find emails by sender, subject, labels, or content
- Use get_gmail_message_content to read full email content including attachments
- Use send_gmail_message to compose and send new emails
- Use draft_gmail_message to save emails for later review
FILES (Drive):
- Use search_drive_files to find documents, spreadsheets, and presentations
- Use get_drive_file_content for file content
- Use create_drive_file to create new files
- Use share_drive_file to manage permissions
CALENDAR:
- Use get_events to see scheduled meetings
- Use create_event to schedule new meetings with attendees
- Use modify_event to update existing events
- Use delete_event to remove events
DOCUMENTS (Docs):
- Use search_docs to find documents by name
- Use get_doc_content to read document content
- Use create_doc to create new documents
- Use modify_doc_text for text changes
- Use find_and_replace_doc for bulk replacements
SPREADSHEETS (Sheets):
- Use read_sheet_values to read cell data
- Use modify_sheet_values to update cells
- Use create_spreadsheet for new spreadsheets
TASKS:
- Use list_tasks to see pending work
- Use create_task to add new tasks with due dates
- Use update_task to mark tasks complete
CHAT:
- Use get_messages to read team conversations
- Use send_message to communicate with team
- Use search_messages to find specific discussions
Always provide helpful, actionable responses based on the data retrieved.
conversation:
type: chain_of_thought
reasoning_style: agent
agent_mode: single_turn
tools:
# Spin service endpoint
spin_endpoint: "http://localhost:3000"
# Load tool definitions from mock endpoint
tools_endpoint: "http://localhost:3000/mock/list-tools"
# Mock execute path
tool_execute_path: "/mock/execute"
# Component-based routing: 'mock' routes to /mock/execute
components:
mock:
# Gmail tools
- search_gmail_messages
- get_gmail_message_content
- get_gmail_messages_content_batch
- get_gmail_thread_content
- send_gmail_message
- draft_gmail_message
- list_gmail_labels
- manage_gmail_label
- modify_gmail_message_labels
- batch_modify_gmail_message_labels
# Drive tools
- search_drive_files
- list_drive_items
- get_drive_file_content
- get_drive_file_download_url
- create_drive_file
- update_drive_file
- share_drive_file
- batch_share_drive_file
- get_drive_file_permissions
- get_drive_shareable_link
- remove_drive_permission
- transfer_drive_ownership
- check_drive_file_public_access
# Calendar tools
- list_calendars
- get_events
- create_event
- modify_event
- delete_event
# Docs tools
- search_docs
- get_doc_content
- list_docs_in_folder
- create_doc
- modify_doc_text
- find_and_replace_doc
- insert_doc_elements
- insert_doc_image
- update_doc_headers_footers
- batch_update_doc
- inspect_doc_structure
- create_document_comment
- read_document_comments
- reply_to_document_comment
- resolve_document_comment
- export_doc_to_pdf
# Sheets tools
- get_spreadsheet_info
- read_sheet_values
- modify_sheet_values
- create_spreadsheet
- create_sheet
- list_spreadsheets
- create_table_with_data
- debug_table_structure
- create_spreadsheet_comment
- read_spreadsheet_comments
- reply_to_spreadsheet_comment
- resolve_spreadsheet_comment
# Slides tools
- get_presentation
- create_presentation
- get_page
- get_page_thumbnail
- batch_update_presentation
- set_publish_settings
- create_presentation_comment
- read_presentation_comments
- reply_to_presentation_comment
- resolve_presentation_comment
# Forms tools
- get_form
- create_form
- list_form_responses
- get_form_response
# Tasks tools
- list_task_lists
- get_task_list
- create_task_list
- update_task_list
- delete_task_list
- list_tasks
- get_task
- create_task
- update_task
- delete_task
- move_task
- clear_completed_tasks
# Chat tools
- list_spaces
- get_messages
- send_message
- search_messages
# Search
- search_custom
- search_custom_siterestrict
- get_search_engine_info
max_per_query: 5
strict: false
# ReAct loop configuration
max_agent_steps: 8
max_retries: 3
llm:
provider: "gemini"
model: "gemini-2.5-flash"
temperature: 0.4
# Output configuration
output:
system_prompt: |
You are a Google Workspace productivity assistant that helps professionals manage their work efficiently.
You have access to the full suite of Google Workspace tools:
- Gmail: Search, read, send emails and manage drafts
- Drive: Search, read, create, and share files
- Calendar: View and manage meetings and events
- Docs: Read, create, and edit documents
- Sheets: Read and update spreadsheet data
- Slides: View and create presentations
- Forms: Create forms and view responses
- Tasks: Manage task lists and individual tasks
- Chat: Read and send messages in team spaces
When given a task:
1. Identify which Google Workspace services are relevant
2. Use appropriate tools to gather information or perform actions
3. Provide clear, actionable summaries of what you found or did
4. Suggest follow-up actions when appropriate
include_system_message: false
num_samples: 10
batch_size: 5
save_as: "google-workspace-dataset.jsonl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment