Skip to main content
Glama
fav-devs

Sociona MCP Server

by fav-devs

get_accounts

Retrieve connected social media accounts from X (Twitter), Instagram, and Threads for managing posts and analytics.

Instructions

Get list of connected social media accounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implements the 'get_accounts' tool by fetching connected social media accounts from the Sociona API via apiRequest('/accounts'), handling empty list, and formatting a response listing accounts by provider, handle, and status.
    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}`,
          },
        ],
      };
    }
  • Input schema for 'get_accounts' tool: an empty object (no required parameters).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • src/index.ts:83-90 (registration)
    Registration of the 'get_accounts' tool in the ListToolsRequestSchema handler, specifying name, description, and input schema.
    {
      name: 'get_accounts',
      description: 'Get list of connected social media accounts',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:142-143 (registration)
    Routing in the CallToolRequestSchema switch statement that invokes getAccounts() for the 'get_accounts' tool.
    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