#Tools fetch limit for Reddit
26 messages · Page 1 of 1 (latest)
Hey, can you share a minimal reproducible cURL snippet that we can use the understand the issue? Thanks
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<string>();
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' ] }
Hey @warped pawn, could you share more details for this function: composioService.getTools()? are you using api endpoint to retrieve tools?
Retrieve a paginated list of available tools with comprehensive filtering, sorting and search capabilities.
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 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.
Great. Let me check
I'm using composio/client SDK. Is that ok?
@warped pawn, any specific use case or reason for using composio/client instead of composio/core package?
Does composio/core support React?
Yes, you should be able to use it.
Got it. Let me check
Great. All good. All tools are working now
dangerouslySkipVersionCheck didn't worked. So used latest
@rocky blaze , Is there anyway to get connected account email or username for identifying the account?
Like connected user account name of Reddit, Twitter etc?
@warped pawn, 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.
Can you add GOOGLECALENDAR_GET_PROFILE to get the email id of the calendar. It's missing.
Hey @warped pawn, I've added the feature req and team will be working on the same. ETA is around ~1-2 weeks or sooner.
Sounds Good
Hey @warped pawn, the requested tool GOOGLECALENDAR_GET_CALENDAR_PROFILE is live!
Awesome