# SosoAPI A2A social operations

Discover the agent at https://sosoapi.ai/.well-known/agent-card.json. It supports
**A2A 0.3 JSON-RPC** at `POST https://sosoapi.ai/a2a`, with structured JSON input
and output. This adapter uses the same social tools and authorization as the
SosoAPI remote MCP server. It does not interpret natural-language instructions.

## Authenticate

Obtain a bearer credential for the existing **`https://sosoapi.ai` MCP resource**
using https://sosoapi.ai/auth.md and its protected-resource metadata at
https://sosoapi.ai/.well-known/oauth-protected-resource. Use the authorization
server appropriate for your supported flow; retain human Workspace/action
consent. `/a2a` is a transport adapter for that resource, not another OAuth
resource or issuer. Supply the credential in the `Authorization: Bearer …`
header. Tokens, claims or Workspace IDs in message metadata grant no authority.

## Discover tools

Send `Content-Type: application/json` and `A2A-Version: 0.3` with this body:

```json
{
  "jsonrpc": "2.0",
  "id": "discover-1",
  "method": "message/send",
  "params": {
    "message": {
      "kind": "message",
      "role": "user",
      "messageId": "discover-message-1",
      "parts": [{"kind": "data", "data": {"method": "tools/list", "params": {}}}]
    }
  }
}
```

`result` is an A2A agent `Message`. Its single data part contains the original
MCP JSON-RPC response, including tool names, schemas, pagination and errors.
Bootstrap credentials return only the existing authorization tool until the
user grants access. Follow `nextCursor` with `tools/list`'s `params.cursor`.

## Run an operation

Use a tool returned by discovery and its exact input schema. Replace the data
part with `{"method":"tools/call","params":{"name":"<discovered name>",
"arguments":{}}}`. Supply the actual schema's required arguments. Existing
authorization, Workspace ownership, confirmation and idempotency requirements
still apply. The adapter forwards the caller's token to the fixed Root MCP
handler without an elevated credential or an alternate URL.

Inspect the original MCP `error` or tool `result.isError` inside the returned
data part. An A2A message is a transport response, not a promise of successful
business execution. Scheduled posts, Asset imports and other accepted work
retain their canonical IDs and lifecycle: use the existing read tools to
reconcile them and inspect terminal outcomes. An accepted publish request is
not proof that the provider published it.

## Limits and recovery

Only one structured data part and one operation per message are supported.
Input and output each have a 1 MiB limit and the adapter has a 40-second total
deadline. It does not automatically retry; after a timeout or missing outcome,
reconcile the original business operation before attempting a write again.
`messageId` correlates a message; it does not replace a domain idempotency key.

The agent returns direct messages and retains no A2A tasks or conversation
state. `tasks/get` and `tasks/cancel` return TaskNotFound; business cancellation
uses its existing authorized tool. Streaming, push notifications, authenticated
extended cards and local-file uploads are unsupported. Use the installed stdio
MCP client for local-file uploads. A2A 1.0 is not advertised by this interface.
