https://linen.dev logo
Tools fetch limit for Reddit
# 🖥│support-forum
r
I used REST API
b
Hey, can you share a minimal reproducible cURL snippet that we can use the understand the issue? Thanks
r
Sure
logConversationConnectionTools: async (conversationId: string, userId: string) => { try { const state = get(); const allConversationConnections = state.connections[conversationId] || []; connections with an actual connected_account_id const authenticatedConnections = allConversationConnections.filter((connection) => connection.user_id === userId && connection.is_authenticated === true && !!connection.connected_account_id ); if (authenticatedConnections.length === 0) { console.log('[Conversation Connections Store] No authenticated Composio connections to list tools for:', { conversationId, userId, }); return; } // Get unique app IDs for which we should fetch tools const appIdsSet = new Set(); authenticatedConnections.forEach((connection) => { if (connection.app_id) { appIdsSet.add(connection.app_id); } }); const appIds = Array.from(appIdsSet); if (appIds.length === 0) { console.log('[Conversation Connections Store] No appIds found for authenticated connections when listing tools:', { conversationId, userId, }); return; } // Use composioService.getTools which uses REST API (/tools) when needed const tools = await composioService.getTools(userId, appIds, authenticatedConnections, conversationId, true); const toolNames = tools.map((tool) => tool.originalName || tool.name); console.log('[Conversation Connections Store] Composio tools for conversation:', { conversationId, userId, appIds, toolsCount: tools.length, toolNames, }); } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; console.error('[Conversation Connections Store] Error logging Composio tools for conversation:', { conversationId, userId, error: errorMessage, }); } },
Result Printed '[Conversation Connections Store] Composio tools for conversation:', { conversationId: '123', userId: '123', appIds: [ 'reddit' ], toolsCount: 10, toolNames: [ 'REDDIT_CREATE_REDDIT_POST', 'REDDIT_DELETE_REDDIT_COMMENT', 'REDDIT_DELETE_REDDIT_POST', 'REDDIT_EDIT_REDDIT_COMMENT_OR_POST', 'REDDIT_GET_USER_FLAIR', 'REDDIT_POST_REDDIT_COMMENT', 'REDDIT_RETRIEVE_POST_COMMENTS', 'REDDIT_RETRIEVE_REDDIT_POST', 'REDDIT_RETRIEVE_SPECIFIC_COMMENT', 'REDDIT_SEARCH_ACROSS_SUBREDDITS' ] }
u
Hey @rohil, could you share more details for this function:
composioService.getTools()
? are you using [api endpoint](https://docs.composio.dev/rest-api/tools/get-tools) to retrieve tools?
@Uday Here is the code
u
Thanks for the info. Looks like your
getTools
lacks toolkit version which is returning tools list for an older default pinned version. Could you try passing the toolkit version is SDK snippet? Docs for ref: https://docs.composio.dev/docs/toolkit-versioning. Also, you can [dangerously skip](https://docs.composio.dev/docs/changelog#adds-version-checks-for-tool-execution-and-improved-execution-speed-in-ts-sdk) the version check by pass
dangerouslySkipVersionCheck
in params which will default to
latest
version. Also, looks like you've implemented fallbacks to use API endpoint, you can add the
[toolkit_versions=latest](https://docs.composio.dev/rest-api/tools/get-tools#request.query.toolkit_versions)
to use the latest version. Let me know if you need any help.
r
Great. Let me check
I'm using composio/client SDK. Is that ok?
u
@rohil, any specific use case or reason for using composio/client instead of composio/core package?
r
Does composio/core support React?
u
Yes, you should be able to use it.
r
Got it. Let me check
Great. All good. All tools are working now
dangerouslySkipVersionCheck didn't worked. So used latest
@Uday , Is there anyway to get connected account email or username for identifying the account? Like connected user account name of Reddit, Twitter etc?
u
@rohil, the standard way of checking the authenticate user details is to use the Test Connection button. Alternatively, you can look for tools which fetches user info. For example:
REDDIT_GET_REDDIT_USER_ABOUT
.
r
Currently using the Tool name. Let me check Test Connection
Thanks man
Can you add GOOGLECALENDAR_GET_PROFILE to get the email id of the calendar. It's missing.
u
Hey @rohil, I've added the feature req and team will be working on the same. ETA is around ~1-2 weeks or sooner.
r
Sounds Good
u
Hey @rohil, the requested tool
GOOGLECALENDAR_GET_CALENDAR_PROFILE
is live!
r
Awesome
Thanks man
2 Views