Tools
The SocialAPI MCP server's tools, how an assistant finds and calls an endpoint, and every endpoint's name.
Three tools, however many endpoints there are: the assistant finds the endpoint for a task, then calls it.
| Tool | Does | Credits |
|---|---|---|
find_endpoints | Finds the endpoints for a task, with their parameters | Free |
call_endpoint | Calls an endpoint and answers its JSON | As the endpoint |
get_credits | Answers the credits left in the workspace | Free |
Every tool only reads. None changes anything on a platform or in your workspace.
Find Endpoints
Search in plain words, such as "tiktok comments" or "reels of an instagram account". Add platform to search one platform, or give platform alone to list all of its endpoints.
{ "query": "instagram post comments" }It answers up to 8 endpoints, best first. The first 3 come with their description and parameters, the rest with what they return.
{
"endpoints": [
{
"name": "instagram_post_comments",
"summary": "A post's comments with their likes, about 22 a page.",
"description": "A post's comments with their likes, about 22 a page. … 5 credits a page.",
"parameters": {
"url": { "type": "string", "description": "The post's link." },
"id": { "type": "string", "description": "The post's media id, instead of `url`." },
"cursor": { "type": "string", "description": "`nextCursor` of the previous page." },
"maxAge": { "type": "integer", "minimum": 0, "description": "How old a cached answer may be, in seconds; …" }
}
},
{ "name": "instagram_post", "summary": "One post or reel with its counts, media and tags.", "parameters": { … } }
]
}An endpoint's name and parameters stay valid for the whole conversation, so the assistant searches once per kind of call. A search for a platform SocialAPI does not read says so, and names the ones it does.
Call Endpoint
Give the endpoint's name and its arguments.
{ "endpoint": "instagram_post_comments", "arguments": { "url": "https://www.instagram.com/p/DA1b2c3D4e5/" } }- A call is the endpoint's request, made with the app's key: charged, cached, limited and logged as any API call.
- The endpoint's path works as its name too, such as
instagram/post/comments. - A name with a typo is refused with the nearest names, such as
tiktok_profilefortiktok_profle.
Answers
A call answers the endpoint's JSON: { data } for one item, { data, pagination } for a list. The fields are the ones in Responses.
The text the assistant reads leaves out empty fields, and the answer in full is in structuredContent. For the next page of a list, the assistant passes pagination.nextCursor back as cursor, and each page is charged as a call of its own.
Its _meta says what the call cost.
| Key | Contains |
|---|---|
socialapi.sh/creditsCharged | Credits the call cost, 0 from the cache |
socialapi.sh/creditsRemaining | Credits left in the workspace |
socialapi.sh/requestId | The request's id, for support |
socialapi.sh/cache | HIT or MISS |
Errors
A refused call is a tool error the assistant reads (isError), and costs nothing. Its text is the code, the status and the message.
NOT_FOUND (404): No TikTok account matches this handle.An argument the endpoint does not take is refused, naming the ones it does. Every code is in Errors.
Direct Mode
For an assistant that only needs a few platforms, add them to the server URL. Each of their endpoints is then a tool of its own, named as below, alongside get_credits.
https://api.socialapi.sh/mcp?platforms=tiktok,instagramUse platforms=all for every endpoint. A platform's tools take about 200 tokens of context each, so keep the list short.
Endpoint Names
Every endpoint by the name call_endpoint takes. Its parameters are on its page in the API Reference.