Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

list_social_accounts

Show all social media accounts linked to your organization, including Instagram, Facebook, and TikTok. Uses your organization ID to fetch connected profiles.

Instructions

List connected social media accounts (Instagram, Facebook, TikTok, etc.).

Shows all social accounts linked to your organization. Requires enterprise subscription. No credits charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
org_idNoOrganization ID (uses YAPARAI_ORG_ID env var if not provided)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for 'list_social_accounts' tool. Resolves org ID, creates a client, and delegates to client.social_list_accounts().
    async def list_social_accounts(
        org_id: str | None = None,
    ) -> dict:
        """
        List connected social media accounts (Instagram, Facebook, TikTok, etc.).
    
        Shows all social accounts linked to your organization.
        Requires enterprise subscription. No credits charged.
    
        Args:
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            List of social accounts with platform, username, account_id, and status.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.social_list_accounts(oid)
  • HTTP client method that makes a GET request to /api/enterprise/orgs/{org_id}/social/accounts — the underlying API call for the tool.
    async def social_list_accounts(self, org_id: str) -> list:
        """List connected social accounts."""
        return await self._request(
            "GET", f"/api/enterprise/orgs/{org_id}/social/accounts"
        )
  • Registration of list_social_accounts as an MCP tool on the FastMCP server.
    mcp.tool(list_social_accounts)
  • Helper that resolves the org_id from an explicit parameter or falls back to the YAPARAI_ORG_ID environment variable.
    def resolve_org_id(org_id: str | None = None) -> str:
        """Return the org_id from parameter or YAPARAI_ORG_ID env var.
    
        Raises ValueError if neither is set.
        """
        oid = org_id or YAPARAI_ORG_ID
        if not oid:
            raise ValueError(
                "Organization ID is required. Either pass org_id parameter "
                "or set the YAPARAI_ORG_ID environment variable. "
                "Use list_organizations() to find your org ID."
            )
        return oid
  • Type definition for supported social media platforms, defined in the same module as list_social_accounts.
    Platform = Literal["instagram", "facebook", "tiktok", "twitter"]
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses read-only nature (listing), enterprise requirement, and no credit cost. Lacks details on pagination or error handling but acceptable for a simple list operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences only: purpose, scope, and requirement. Front-loaded and no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one parameter and an output schema, the description covers essential context: what it lists, organizational scope, subscription requirement, and cost. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers 100% of the single parameter (org_id) with a clear description. The description adds no new information beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool lists connected social media accounts, with examples (Instagram, Facebook, TikTok). It is distinct from sibling tools like create_social_post or list_social_posts, which deal with posts rather than accounts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description mentions enterprise subscription requirement and that no credits are charged, giving clear usage context. It does not explicitly list alternatives but the purpose is self-contained.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ilhankilic/yaparai-mcp'

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