export_to_gsheet
Export a Mycorr table to Google Sheets. destination is new_spreadsheet (always works) or existing_spreadsheet with a spreadsheet_id (URL or id) and a new_tab/overwrite_tab target. For a new sheet with one connected account, table_id and destination are all you need.
An EXISTING sheet works only if Mycorr created it or the user picked it in the Mycorr app before (Google's per-file drive.file scope); any other id errors, telling the user to pick it in the app. Ask the user for its URL and tab name, or call list_exportable_spreadsheets to let them pick.
ACCOUNT: saved_connection_id auto-picks when one Sheets account is connected. With several, the call SUCCEEDS with status: "choose_account" and the list: NOT a failure, so do not say anything failed. Show the accounts, ask which, call again with that saved_connection_id, and reuse an account already settled in this flow without asking again. With none, the error tells the user to connect one in the app.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table_id": "<table_id>",
"destination": "<destination>"
},
"name": "export_to_gsheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | MyCorr table id to export. | |
| destination | Yes | New spreadsheet (recommended) or an existing one you picked in the app. | |
| saved_connection_id | No | Google connection to write with; auto-picked when there is only one. |