Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

get_social_quota

Check your social media post quota, message limits, and billing period before running bulk operations to avoid exceeding usage limits.

Instructions

Get social media quota and usage limits.

Returns remaining post quota, message limits, and billing period info. Useful to check before running bulk operations.

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

  • Tool handler: get_social_quota() — resolves org ID, creates a YaparAIClient, and delegates to client.social_get_quota(oid). Returns a dict with quota usage limits and billing period info.
    async def get_social_quota(
        org_id: str | None = None,
    ) -> dict:
        """
        Get social media quota and usage limits.
    
        Returns remaining post quota, message limits, and billing period info.
        Useful to check before running bulk operations.
    
        Args:
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with quota limits, used counts, and billing period dates.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.social_get_quota(oid)
  • Tool registration: mcp.tool(get_social_quota) registers the handler with the MCP server as part of the 'Enterprise: Social Media' group (tools 157-166).
    mcp.tool(get_social_quota)
  • Helper: resolve_org_id() — resolves the org_id from the explicit parameter or falls back to YAPARAI_ORG_ID env var. Used by get_social_quota.
    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
  • API client method: social_get_quota() — sends a GET request to /api/enterprise/orgs/{org_id}/social/quota to retrieve the social media quota.
    async def social_get_quota(self, org_id: str) -> dict:
        """Get social media quota."""
        return await self._request(
            "GET", f"/api/enterprise/orgs/{org_id}/social/quota"
        )
  • Import statement: get_social_quota is imported from yaparai.tools.social into server.py for MCP registration.
    from yaparai.tools.social import (
        list_social_accounts,
        create_social_post,
        list_social_posts,
        get_social_quota,
        generate_caption,
        generate_hashtags,
        list_inbox,
        read_conversation,
        reply_to_message,
        ai_reply_suggestion,
    )
Behavior4/5

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

Implicitly a read-only operation ('Get'), no side effects mentioned. Lacks explicit statement of no destructive action, but adequate given simplicity.

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 short sentences, front-loaded with main action. No wasted 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?

Complete for a simple quota check: explains return values, usage context, and benefits from output schema. 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?

Schema coverage is 100% with parameter description already. Description adds no extra parameter detail, but not necessary due to high coverage.

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?

Clearly states it gets social media quota and usage limits, specifying remaining post quota, message limits, and billing period info. Distinct from siblings like check_balance.

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?

Explicitly suggests using before bulk operations, which is helpful context. However, does not mention when not to use or provide alternatives.

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