get_accounts
Retrieve connected social media accounts from X (Twitter), Instagram, and Threads to manage posting and scheduling across platforms.
Instructions
Get list of connected social media accounts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:197-223 (handler)The primary handler function for the 'get_accounts' tool. Fetches connected social media accounts from the Sociona API, handles empty list case, formats a list of accounts with provider, handle, and status, and returns a formatted text response.private async getAccounts() { const { accounts } = await this.apiRequest('GET', '/accounts'); if (!accounts || accounts.length === 0) { return { content: [ { type: 'text', text: 'No social media accounts connected.', }, ], }; } const accountList = accounts .map((a: any) => `- ${a.provider}: ${a.handle} (${a.status})`) .join('\n'); return { content: [ { type: 'text', text: `Connected accounts:\n${accountList}`, }, ], }; }
- src/index.ts:83-90 (registration)Tool registration in the ListTools response. Defines the tool name, description, and input schema (empty object, no parameters required).{ name: 'get_accounts', description: 'Get list of connected social media accounts', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:142-143 (registration)Dispatch case in the CallToolRequest handler that routes 'get_accounts' calls to the getAccounts() method.case 'get_accounts': return await this.getAccounts();