Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fav-devs/sociona-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server