Skip to content

Commit cd66fa8

Browse files
aadamgoughaadamgough
andauthored
fix(tools): fixed trello and telegram operations (#2332)
* fixed trello output * fixed telegram --------- Co-authored-by: aadamgough <[email protected]>
1 parent 045475b commit cd66fa8

File tree

8 files changed

+7
-19
lines changed

8 files changed

+7
-19
lines changed

apps/sim/blocks/blocks/trello.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
381381
text: { type: 'string', description: 'Comment text' },
382382
},
383383
outputs: {
384-
success: { type: 'boolean', description: 'Whether the operation was successful' },
385384
lists: {
386385
type: 'array',
387386
description: 'Array of list objects (for list_lists operation)',
@@ -404,11 +403,7 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
404403
},
405404
count: {
406405
type: 'number',
407-
description: 'Number of items returned (boards, cards, actions)',
408-
},
409-
error: {
410-
type: 'string',
411-
description: 'Error message if operation failed',
406+
description: 'Number of items returned (lists, cards, actions)',
412407
},
413408
},
414409
}

apps/sim/tools/telegram/send_document.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ export const telegramSendDocumentTool: ToolConfig<
4848
'Content-Type': 'application/json',
4949
}),
5050
body: (params: TelegramSendDocumentParams) => {
51+
let normalizedFiles: unknown[] | null = null
52+
if (params.files) {
53+
normalizedFiles = Array.isArray(params.files) ? params.files : [params.files]
54+
}
55+
5156
return {
5257
botToken: params.botToken,
5358
chatId: params.chatId,
54-
files: params.files || null,
59+
files: normalizedFiles,
5560
caption: params.caption,
5661
}
5762
},

apps/sim/tools/trello/add_comment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ export const trelloAddCommentTool: ToolConfig<TrelloAddCommentParams, TrelloAddC
8686
},
8787

8888
outputs: {
89-
success: { type: 'boolean', description: 'Whether the comment was added successfully' },
9089
comment: {
9190
type: 'object',
9291
description: 'The created comment object with id, text, date, and member creator',
9392
},
94-
error: { type: 'string', description: 'Error message if operation failed' },
9593
},
9694
}

apps/sim/tools/trello/create_card.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,9 @@ export const trelloCreateCardTool: ToolConfig<TrelloCreateCardParams, TrelloCrea
119119
},
120120

121121
outputs: {
122-
success: { type: 'boolean', description: 'Whether the card was created successfully' },
123122
card: {
124123
type: 'object',
125124
description: 'The created card object with id, name, desc, url, and other properties',
126125
},
127-
error: { type: 'string', description: 'Error message if operation failed' },
128126
},
129127
}

apps/sim/tools/trello/get_actions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,10 @@ export const trelloGetActionsTool: ToolConfig<TrelloGetActionsParams, TrelloGetA
102102
},
103103

104104
outputs: {
105-
success: { type: 'boolean', description: 'Whether the operation was successful' },
106105
actions: {
107106
type: 'array',
108107
description: 'Array of action objects with type, date, member, and data',
109108
},
110109
count: { type: 'number', description: 'Number of actions returned' },
111-
error: { type: 'string', description: 'Error message if operation failed' },
112110
},
113111
}

apps/sim/tools/trello/list_cards.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,11 @@ export const trelloListCardsTool: ToolConfig<TrelloListCardsParams, TrelloListCa
7777
},
7878

7979
outputs: {
80-
success: { type: 'boolean', description: 'Whether the operation was successful' },
8180
cards: {
8281
type: 'array',
8382
description:
8483
'Array of card objects with id, name, desc, url, board/list IDs, labels, and due date',
8584
},
8685
count: { type: 'number', description: 'Number of cards returned' },
87-
error: { type: 'string', description: 'Error message if operation failed' },
8886
},
8987
}

apps/sim/tools/trello/list_lists.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ export const trelloListListsTool: ToolConfig<TrelloListListsParams, TrelloListLi
7777
},
7878

7979
outputs: {
80-
success: { type: 'boolean', description: 'Whether the operation was successful' },
8180
lists: {
8281
type: 'array',
8382
description: 'Array of list objects with id, name, closed, pos, and idBoard',
8483
},
8584
count: { type: 'number', description: 'Number of lists returned' },
86-
error: { type: 'string', description: 'Error message if operation failed' },
8785
},
8886
}

apps/sim/tools/trello/update_card.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,9 @@ export const trelloUpdateCardTool: ToolConfig<TrelloUpdateCardParams, TrelloUpda
118118
},
119119

120120
outputs: {
121-
success: { type: 'boolean', description: 'Whether the card was updated successfully' },
122121
card: {
123122
type: 'object',
124123
description: 'The updated card object with id, name, desc, url, and other properties',
125124
},
126-
error: { type: 'string', description: 'Error message if operation failed' },
127125
},
128126
}

0 commit comments

Comments
 (0)