Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions apps/sim/lib/api/contracts/mothership-assistant-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,48 @@ export const searchPeopleInputSchema = z
message: 'Pass either personId or a query with its cursor, not both.',
})

/**
* The caller's own questions to Sim over a window, oldest first. The 92-day window and the page
* bounds are literals so the worker's generated copy stays standalone.
*/
export const listMyChatHistoryInputSchema = z
.object({
startDate: z
.string()
.datetime({ offset: true })
.describe(
'Inclusive lower bound on when you asked, as an ISO datetime with your timezone offset. For whole days, use local midnight on the first day.'
),
endDate: z
.string()
.datetime({ offset: true })
.optional()
.describe(
'Exclusive upper bound, at most 92 days after startDate; defaults to now. For whole days, use local midnight after the final day.'
),
topK: z
.number()
.int()
.min(1)
.max(100)
.optional()
.describe('Questions per page, 50 by default.'),
cursor: z
.string()
.min(1)
.max(1024)
.optional()
.describe('nextCursor from the previous page of the same window.'),
includeAnswers: z
.boolean()
.optional()
.describe(
"Adds the start of Sim's answer to each question. Answers reflect the sources as they were when asked."
),
})
.strict()
export type ListMyChatHistoryInput = z.output<typeof listMyChatHistoryInputSchema>

/** Connection requests name a provider and optionally an owned account to repair. */
export const oauthGetAuthLinkInputSchema = z.object({
providerName: z
Expand Down Expand Up @@ -438,6 +480,13 @@ export const assistantToolContracts = [
'Look up people in this organization’s directory by name, email, title, department, or location. Returns each person’s title, department, location, email, and manager. When exactly one person matches, or with a personId, returns that person with managerChain (direct manager first) and directReports. Covers only this organization’s people; use search_workspace for customers, vendors, and other outside contacts.',
inputSchema: searchPeopleInputSchema,
},
{
id: 'list_my_chat_history',
route: 'sim',
description:
'List the questions you asked Sim (the Assistant, agent chats, the Slack app and Search MCP chat) in a time window, oldest first, each with a link to its conversation. Covers only your own conversations that still exist.',
inputSchema: listMyChatHistoryInputSchema,
},
{
id: 'oauth_get_auth_link',
route: 'sim',
Expand Down
Loading
Loading