The Upstream MCP connector routes your AI agent's tool calls to Upstream's own MCP server through Scalekit. Each user connects their own Upstream access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 46 tools.
- Tools
- 46
- What they doRead · write · destructive
- 20 · 22 · 420 read22 write4 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Upstream MCP connection
In AgentKit > Connections, create an Upstream MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Console steps with screenshots
Register your Upstream Personal Access Token with Scalekit so it can authenticate and proxy inbox requests on behalf of your users. Upstream MCP uses bearer token authentication.
-
Get a bearer token
-
Sign in to your Upstream account and open your account settings.
-
Find the Personal Access Tokens (or API tokens) section.
-
Click Create token. Give it a name (e.g.,
Agent Auth) and confirm. -
Copy the token immediately — it will not be shown again.
-
-
Create a connection in Scalekit
-
In Scalekit dashboard, go to AgentKit > Connections. Find Upstream and click Create.
-
Note the Connection name — you will use this as
connection_namein your code (e.g.,upstreammcp).
-
-
Add a connected account
Connected accounts link a specific user identifier in your system to an Upstream Personal Access Token. Add one in the dashboard to test. In production, each user adds their own through the authorization link: they enter their credentials on the page it opens.
In the dashboard, to test
-
Open the connection you created and click the Connected Accounts tab → Add account.
-
Fill in:
- Your User’s ID — a unique identifier for this user in your system (e.g.,
user_123) - Bearer Token — the Personal Access Token you copied in step 1
- Your User’s ID — a unique identifier for this user in your system (e.g.,
-
Click Save.
From your backend, if your app already has the credentials
For example, when users enter them on a settings page in your app:
import { ConnectorStatus } from '@scalekit-sdk/node'const authorizationDetails = {details: {case: 'staticAuth',value: { details: { token: 'upstream_pat_...' } },},};let { connectedAccount } = await scalekit.actions.upsertConnectedAccount({connectionName: 'upstreammcp',identifier: 'user_123', // your user's unique IDauthorizationDetails,});// Make sure the account is ACTIVE before the first tool call.if (connectedAccount?.status !== ConnectorStatus.ACTIVE) {({ connectedAccount } = await scalekit.actions.upsertConnectedAccount({connectionName: 'upstreammcp',identifier: 'user_123',authorizationDetails,}));}authorization_details = {"static_auth": {"token": "upstream_pat_..."}}response = scalekit_client.actions.upsert_connected_account(connection_name="upstreammcp",identifier="user_123",authorization_details=authorization_details,)# Make sure the account is ACTIVE before the first tool call.if response.connected_account.status != "ACTIVE":response = scalekit_client.actions.upsert_connected_account(connection_name="upstreammcp",identifier="user_123",authorization_details=authorization_details,) -
-
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'upstreammcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Upstream MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'upstreammcp_get_inbox_split_threads',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "upstreammcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Upstream MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="upstreammcp_get_inbox_split_threads",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Upstream MCP server credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolupstreammcp_get_channel_threadsList threads in a specific channel.Read-onlyGet Channel Threads
List threads in a specific channel. Use list-channels first to get channel IDs. Returns paginated thread list with subjects, senders, and dates.
Inputs
channelIdstringrequired- Channel ID from list-channels
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_get_inbox_split_threadsList threads in a specific inbox split, category, or system split.Read-onlyGet Inbox Split Threads
List threads in a specific inbox split, category, or system split. Provide exactly one of splitId, category, or systemSplit. Get valid filter values from list-inbox-splits first.
Inputs
categorystring- Inbox category (e.g. CATEGORY_PRIMARY)one of
CATEGORY_PRIMARYCATEGORY_PERSONALCATEGORY_PROMOTIONSCATEGORY_SOCIALCATEGORY_UPDATESCATEGORY_FORUMS limitinteger- Page size, 1-100 (default 20)
pageTokenstring- Cursor for next page from previous response
splitIdstring- Custom inbox split ID from list-inbox-splits
systemSplitstring- System split: "follow-ups", "needs-reply", or "cold-emails"one of
follow-upsneeds-replycold-emailsfollowupsautodrafts
upstreammcp_get_label_threadsList threads with a specific label.Read-onlyGet Label Threads
List threads with a specific label. Use list-labels first to get label IDs. Returns paginated thread list.
Inputs
labelIdstringrequired- Label ID from list-labels
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_get_selfGet current user profile, account status, settings, and organization memberships in one call.Read-onlyGet Current User
Get current user profile, account status, settings, and organization memberships in one call. Useful for understanding user identity, feature flags, unread counts, and AI draft configuration.
Inputs
This tool takes no inputs.
upstreammcp_list_channelsList all channels the user belongs to.Read-onlyList Channels
List all channels the user belongs to. Channels are team shared spaces for organizing threads. Returns channel IDs, names, colors, member counts, and unread counts. Use get-channel-threads to browse threads within a channel.
Inputs
This tool takes no inputs.
upstreammcp_list_contactsList all contacts the user has interacted with.Read-onlyList Contacts
List all contacts the user has interacted with. Returns email addresses, display names, and profile pictures. Useful for finding recipient addresses when composing or replying to emails.
Inputs
This tool takes no inputs.
upstreammcp_list_draft_threadsList new thread drafts saved through MCP.Read-onlyList Draft Threads
List new thread drafts saved through MCP. Returns unsent draft threads owned by the user.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_inbox_splitsList all inbox splits visible to the authenticated user, in display order.Read-onlyListInboxSplits
List all inbox splits visible to the authenticated user, in display order. Includes Primary, system splits (Needs Reply, Follow Ups), custom splits, and category splits (Promotions, Social, Updates). Each entry contains a filter_param object — pass it directly to get-inbox-split-threads. Use this tool first to discover available splits before fetching threads.
Inputs
This tool takes no inputs.
upstreammcp_list_labelsList all labels the user has created.Read-onlyList Labels
List all labels the user has created. Returns label IDs, names, and colors. Use get-label-threads to browse threads with a specific label.
Inputs
This tool takes no inputs.
upstreammcp_list_org_membersList all members of an organization.Read-onlyList Organization Members
List all members of an organization. Returns user IDs, names, emails, and profile pictures. Use get-self to find your organization ID.
Inputs
organizationIdstringrequired- Organization ID (from get-self)
upstreammcp_list_rulesList all inbox automation rules.Read-onlyList Rules
List all inbox automation rules. Rules automatically apply actions (add to channel, add label, star, mark spam) to matching emails. Returns rule IDs, queries, actions, and whether they apply to incoming mail.
Inputs
This tool takes no inputs.
upstreammcp_list_scheduled_threadsList threads with scheduled sends.Read-onlyList Scheduled Threads
List threads with scheduled sends. Returns threads with messages scheduled for future delivery.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_sent_threadsList threads from the Sent folder.Read-onlyList Sent Threads
List threads from the Sent folder. Returns sent emails with subjects, recipients, and dates.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_snoozed_threadsList snoozed threads.Read-onlyList Snoozed Threads
List snoozed threads. Returns threads the user has deferred to reappear later.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_spam_threadsList threads in the Spam folder.Read-onlyList Spam Threads
List threads in the Spam folder. Returns threads marked as spam.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_starred_threadsList starred/flagged threads.Read-onlyList Starred Threads
List starred/flagged threads. Returns threads the user has starred for quick access.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_list_trashed_threadsList threads in the Trash.Read-onlyList Trashed Threads
List threads in the Trash. Returns deleted threads that can be restored.
Inputs
limitinteger- Max results, 1-50 (default 20)
pageTokenstring- Cursor for next page from previous response
upstreammcp_read_threadRead a thread with its messages.Read-onlyRead Thread
Read a thread with its messages. Use response_format "concise" (default) for metadata and snippets only — saves context tokens. Use "detailed" for full message bodies when you need complete content.
Inputs
threadIdstringrequired- Thread ID from get-inbox-split-threads or search-inbox
response_formatstring- Level of detail: "concise" (default) returns snippets; "detailed" returns full bodiesone of
concisedetailed
upstreammcp_read_thread_commentsRead internal team comments on a thread (not visible to external recipients).Read-onlyRead Thread Comments
Read internal team comments on a thread (not visible to external recipients). Comments are scoped to an organization. Use get-self to find your organization ID. Use response_format "concise" (default) for snippets; "detailed" for full bodies.
Inputs
organizationIdstringrequired- Organization ID (from get-self)
threadIdstringrequired- Thread ID from search-inbox or get-inbox-split-threads
response_formatstring- Level of detail: "concise" (default) returns snippets; "detailed" returns full bodiesone of
concisedetailed
upstreammcp_search_inboxSearch across all inbox threads by keyword or phrase.Read-onlySearch Inbox
Search across all inbox threads by keyword or phrase. Returns matching threads with subjects, senders, and dates. More efficient than browsing splits when looking for specific content. Use read-thread to get full details of a specific result.
Inputs
querystringrequired- Search query — matches subject, body, and sender fields
limitinteger- Max results, 1-50 (default 10)
pageTokenstring- Cursor for next page from previous response
upstreammcp_compose_threadCreate and send a new email thread.WriteCompose New Thread
Create and send a new email thread. Requires at least one recipient in the "to" field. Optionally assign to channels for team visibility.
Inputs
bodystringrequired- Email body (HTML supported)
toarrayrequired- Primary recipients (email addresses)
bccarray- BCC recipients
ccarray- CC recipients
channelIdsarray- Channel IDs to assign this thread to (from list-channels)
includeSignaturesboolean- Whether to append Gmail and Upstream signatures when they are not already presentdefault
true subjectstring- Email subject line
upstreammcp_create_channelCreate a new team channel for organizing and sharing threads.WriteCreate Channel
Create a new team channel for organizing and sharing threads. Requires an organization membership. Use get-self to find your organization ID.
Inputs
namestringrequired- Channel name
organizationIdstringrequired- Organization ID (from get-self)
colorstring- Channel color (defaults to lynch)one of
lynchsea_pinksungloburning_sandrob_royshadow_greensilver_treemonte_carloblue_chilljordy_bluecornflower_bluebiloba_flowerlavender_florallight_orchid isPublicboolean- Whether the channel is public (default: true)
upstreammcp_create_inbox_splitCreate a new custom inbox split.WriteCreate Inbox Split
Create a new custom inbox split. Splits filter inbox threads by a query string (matching sender, subject, body). Use list-inbox-splits to see existing splits.
Inputs
namestringrequired- Split display name
querystringrequired- Filter query — emails matching this appear in the split
showInCategorySplitboolean- Also show matching threads in their original category (default: true)default
true
upstreammcp_create_labelCreate a new label for organizing threads.WriteCreate Label
Create a new label for organizing threads. Use manage-thread-labels to apply labels to threads after creation.
Inputs
namestringrequired- Label name
colorstring- Label color (defaults to slate_gray). Available: slate_gray, lavender_gray, jelly_bean, pale_chestnut, mandarin, apricot, mellow_apricot, very_pale_orange, naples_yellow, blond, medium_aquamarine, magic_mint, forest_green, jet_stream, cadet_blue, crystal, havelock_blue, beau_blue, medium_purple, pale_lavender, pastel_magenta, pale_pink, tuscany, timberwolfone of
slate_graylavender_grayjelly_beanpale_chestnutmandarinapricotmellow_apricotvery_pale_orangenaples_yellowblondmedium_aquamarinemagic_mintforest_greenjet_streamcadet_bluecrystalhavelock_bluebeau_bluemedium_purplepale_lavenderpastel_magentapale_pinktuscanytimberwolf
upstreammcp_create_ruleCreate a new inbox automation rule.WriteCreate Rule
Create a new inbox automation rule. Rules match emails by query string and add matching emails to a channel automatically. Queries match against sender, subject, and body. Set applyToIncoming=true to apply to future incoming emails, bulkApplication=true to apply to existing matching threads.
Inputs
actionsarrayrequired- Actions to apply on matching emails
querystringrequired- Match query — emails matching this text trigger the rule
applyToIncomingboolean- Apply to future incoming emails (default: true)default
true bulkApplicationboolean- Also apply to existing matching threads (default: false)default
false
upstreammcp_done_threadArchive/mark a thread as done, removing it from the inbox.WriteDone Thread
Archive/mark a thread as done, removing it from the inbox. The thread remains accessible via search or folder views but leaves the active inbox. Pass the inbox item IDs (from get-inbox-split-threads results).
- Idempotent
Inputs
inboxItemIdsarrayrequired- Inbox item IDs to mark done (from get-inbox-split-threads)
upstreammcp_generate_draftGenerate an AI-powered draft reply for a thread.WriteGenerate AI Draft
Generate an AI-powered draft reply for a thread. Returns the draft text directly — use it with reply-to-thread to send. The draft is based on thread context, user writing style, and optional custom instructions. Consumes one draft quota unit.
- Idempotent
Inputs
threadIdstringrequired- Thread ID to generate a draft for
currentDraftBodystring- Optional existing draft body to refine or continue
customInstructionsstring- Optional instructions to guide draft generation (e.g. "be formal", "decline politely")
upstreammcp_manage_channel_participantsAdd or remove members from a channel.WriteAdd/Remove Channel Members
Add or remove members from a channel. Use list-org-members to find user IDs and list-channels to find channel IDs.
- Idempotent
Inputs
actionstringrequired- "add" to invite members, "remove" to remove themone of
addremove channelIdstringrequired- Channel ID to modify
participantIdsarrayrequired- User IDs to add or remove
upstreammcp_manage_thread_channelsAdd or remove channel assignments on one or more threads.WriteAdd/Remove Thread Channels
Add or remove channel assignments on one or more threads. Use list-channels to get available channel IDs.
- Idempotent
Inputs
actionstringrequired- "add" to assign to channels, "remove" to unassignone of
addremove channelIdsarrayrequired- Channel IDs to add or remove
threadIdsarrayrequired- Thread IDs to modify
upstreammcp_manage_thread_followersAdd or remove followers on a thread.WriteAdd/Remove Thread Followers
Add or remove followers on a thread. Followers get notifications about thread activity. Use list-org-members to get user IDs.
- Idempotent
Inputs
actionstringrequired- "add" to follow, "remove" to unfollowone of
addremove threadIdstringrequired- Thread ID to modify followers on
userIdsarrayrequired- User IDs to add or remove as followers
upstreammcp_manage_thread_labelsAdd or remove labels on one or more threads.WriteAdd/Remove Thread Labels
Add or remove labels on one or more threads. Use list-labels to get available label IDs.
- Idempotent
Inputs
actionstringrequired- "add" to apply labels, "remove" to take them offone of
addremove labelIdsarrayrequired- Label IDs to add or remove
threadIdsarrayrequired- Thread IDs to modify
upstreammcp_mark_readMark all messages in a thread as read.WriteMark Thread as Read
Mark all messages in a thread as read. Clears the unread indicator for this thread.
- Idempotent
Inputs
threadIdstringrequired- Thread ID to mark as read
upstreammcp_move_to_categoryMove threads from one inbox category to another.WriteMove to Category
Move threads from one inbox category to another. Use list-inbox-splits to see available categories.
- Idempotent
Inputs
fromCategorystringrequired- Current category of the threadsone of
CATEGORY_PRIMARYCATEGORY_PERSONALCATEGORY_PROMOTIONSCATEGORY_SOCIALCATEGORY_UPDATESCATEGORY_FORUMS threadIdsarrayrequired- Thread IDs to move
toCategorystringrequired- Target category to move threads toone of
CATEGORY_PRIMARYCATEGORY_PERSONALCATEGORY_PROMOTIONSCATEGORY_SOCIALCATEGORY_UPDATESCATEGORY_FORUMS
upstreammcp_post_thread_commentPost an internal team comment on a thread.WritePost Thread Comment
Post an internal team comment on a thread. Comments are only visible to organization members, not to external email recipients. Use get-self to find your organization ID.
Inputs
bodystringrequired- Comment body (HTML supported)
organizationIdstringrequired- Organization ID (from get-self)
threadIdstringrequired- Thread ID to comment on
upstreammcp_reply_to_threadSend a reply in an existing thread.WriteReply to Thread
Send a reply in an existing thread. You must provide at least one "to" recipient. Use read-thread to see existing participants. Optionally add cc/bcc addresses.
Inputs
bodystringrequired- Reply message body (HTML supported)
threadIdstringrequired- Thread ID to reply to
toarrayrequired- "To" recipients — use read-thread to see thread participants
bccarray- BCC recipients (email addresses)
ccarray- CC recipients (email addresses)
includeSignaturesboolean- Whether to append Gmail and Upstream signatures when they are not already presentdefault
true
upstreammcp_save_draft_replySave a draft reply in an existing thread without sending it.WriteSave Draft Reply
Save a draft reply in an existing thread without sending it. If recipients are omitted, Upstream stores no recipients on the draft and uses the current default reply recipients when the draft is opened. If recipients are provided, they replace the defaults and are stored on the draft.
Inputs
bodystringrequired- Draft reply body (HTML supported)
threadIdstringrequired- Thread ID to save a draft reply for
explanationstring- Optional user-visible explanation shown with the saved draft in Upstream
overwriteExistingDraftboolean- Whether to replace an existing active draft on this threaddefault
false recipientsobject- Optional full recipient override. If omitted, Upstream uses current default reply recipients when the draft is opened.
upstreammcp_save_draft_threadSave a new email thread draft without sending it.WriteSave Draft Thread
Save a new email thread draft without sending it. Recipients and channel IDs are optional and can be added later in Upstream. Use compose-thread when the message should be sent immediately.
Inputs
bodystringrequired- Draft body (HTML supported)
bccarray- BCC recipients
ccarray- CC recipients
channelIdsarray- Channel IDs to assign this draft thread to (from list-channels)
subjectstring- Email subject line
toarray- Primary recipients (email addresses)
upstreammcp_snooze_threadSnooze a thread until a specific date/time.WriteSnooze Thread
Snooze a thread until a specific date/time. The thread will be removed from the inbox and reappear at the specified time. Use list-snoozed-threads to see currently snoozed threads.
- Idempotent
Inputs
snoozeUntilstringrequired- ISO 8601 date-time when the thread should reappear (e.g. "2025-01-15T09:00:00Z")
threadIdstringrequired- Thread ID to snooze
upstreammcp_star_threadsStar or unstar one or more threads.WriteStar/Unstar Threads
Star or unstar one or more threads. Starred threads appear in list-starred-threads.
- Idempotent
Inputs
starredbooleanrequired- true to star, false to unstar
threadIdsarrayrequired- Thread IDs to star/unstar
upstreammcp_update_inbox_splitUpdate an existing custom inbox split.WriteUpdate Inbox Split
Update an existing custom inbox split. Only provided fields are changed. Use list-inbox-splits to get split IDs.
- Idempotent
Inputs
splitIdstringrequired- Inbox split ID to update
namestring- New display name
querystring- New filter query
showInCategorySplitboolean- Whether to also show in category view
upstreammcp_update_ruleUpdate an existing inbox automation rule.WriteUpdate Rule
Update an existing inbox automation rule. Only provided fields are updated; omitted fields remain unchanged. Only ADD_TO_CHANNEL actions are currently supported. Use list-rules first to get rule IDs.
- Idempotent
Inputs
ruleIdstringrequired- Rule ID to update (from list-rules)
actionsarray- New actions (replaces all existing actions)
querystring- New match query
upstreammcp_update_settingsUpdate user settings like auto-draft configuration, theme, and notification preferences.WriteUpdate User Settings
Update user settings like auto-draft configuration, theme, and notification preferences. Only provided fields are changed. Use get-self to see current settings first.
- Idempotent
Inputs
autoAdvanceEnabledboolean- Automatically advance to next thread after triaging
autoDraftEnabledboolean- Enable or disable AI auto-drafting
brandingSignatureEnabledboolean- Include branding in email signature
gmailSignatureEnabledboolean- Include the primary Gmail signature in sent emails
upstreammcp_delete_inbox_splitPermanently delete a custom inbox split.DestructiveDelete Inbox Split
Permanently delete a custom inbox split. Threads previously in this split remain in their categories. Use list-inbox-splits to get split IDs.
- Idempotent
Inputs
splitIdstringrequired- Inbox split ID to delete
upstreammcp_delete_rulePermanently delete an inbox automation rule.DestructiveDelete Rule
Permanently delete an inbox automation rule. Use list-rules first to get rule IDs.
- Idempotent
Inputs
ruleIdstringrequired- Rule ID to delete (from list-rules)
upstreammcp_mark_spamMark a thread as spam or remove the spam designation.DestructiveMark as Spam / Not Spam
Mark a thread as spam or remove the spam designation. Spam threads are moved to the spam folder.
- Idempotent
Inputs
spambooleanrequired- true to mark as spam, false to mark as not spam
threadIdstringrequired- Thread ID
upstreammcp_trash_threadsMove threads to trash or restore them.DestructiveTrash/Untrash Threads
Move threads to trash or restore them. Trashed threads can be restored with trashed=false. Use list-trashed-threads to see trashed threads.
- Idempotent
Inputs
threadIdsarrayrequired- Thread IDs to trash/untrash
trashedbooleanrequired- true to trash, false to restore from trash
No tools match.
Workflows
Tool calling
- Use
upstreammcp_search_inboxto find threads by keyword across subject, body, and sender before reading them. - Use
upstreammcp_get_inbox_split_threadswithsystemSplit: "needs-reply"to list threads that are waiting on the user. - Use
upstreammcp_read_threadto load a thread’s messages — the defaultconciseformat saves context tokens. - Use
upstreammcp_generate_draftto get an AI-drafted reply for a thread, thenupstreammcp_reply_to_threadto send it. - Use
upstreammcp_done_threadto archive a thread once it is handled.
const toolResponse = await actions.executeTool({ connector: 'upstreammcp', identifier: 'user_123', toolName: 'upstreammcp_search_inbox', toolInput: { query: 'invoice', limit: 10, },});console.log('Matching threads:', toolResponse.data);tool_response = actions.execute_tool( connection_name='upstreammcp', identifier='user_123', tool_name='upstreammcp_search_inbox', tool_input={ "query": "invoice", "limit": 10, },)print("Matching threads:", tool_response)