# bsocial_publish

Publish a post, reply, reaction or message with your BAP identity.

## Example

```json
{
  "action": {
    "type": "post",
    "content": "Hello Bitcoin",
    "contentType": "text/plain"
  },
  "preview": true
}
```

## Result

Transaction ID, action type and output count; preview returns unsigned output scripts without spending.

## Permissions

The selected identity wallet signs and funds through its existing permissions. Legacy wallets require a separate identity key plus a payment key. Broadcasting must be enabled unless preview is true.

Choose action.type. Replies are posts with replyTo. Tags and attachments have separately signed outputs. A message recipient is routing metadata, not encryption. Friend records advertise a supplied communication public key and do not establish a secure messaging protocol. unfriend and video are indexer extensions.

## Definition 1 (full and compact)

Registered in: Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault + sponsor.

Publish a signed Bitcoin Schema social action: post/reply, repost, like/unlike, follow/unfollow, friend/unfriend, message, or video. Posts/messages support context, tags and attachments. Content is public and permanent; recipient context does NOT encrypt a message. Friend records require your communication public key from an established key-agreement workflow. Requires the selected BAP identity wallet or explicit legacy identity key and funding. Use preview to inspect unsigned outputs without spending.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| action | object | Yes |  |  |
| preview | boolean | No | Return unsigned output scripts without signing, funding, or broadcasting. | default: false |

### action.type = "post"

- action.type (string; required):  const: "post"
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.content (string; required):  minLength: 1; maxLength: 400000
- action.contentType (string):  default: "text/plain"; maxLength: 128; pattern: "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
- action.encoding ("utf8" | "base64"): Input encoding. Base64 is decoded to binary B content. default: "utf8"
- action.filename (string):  maxLength: 255
- action.context (object):  
- action.context.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.context.value (string; required):  minLength: 1; maxLength: 2048
- action.subcontext (object):  
- action.subcontext.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.subcontext.value (string; required):  minLength: 1; maxLength: 2048
- action.tags (array of string):  maxItems: 50
- action.attachments (array of object):  maxItems: 8
- action.attachments[].content (string; required):  minLength: 1; maxLength: 400000
- action.attachments[].contentType (string):  default: "text/plain"; maxLength: 128; pattern: "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
- action.attachments[].encoding ("utf8" | "base64"): Input encoding. Base64 is decoded to binary B content. default: "utf8"
- action.attachments[].filename (string):  maxLength: 255
- action.replyTo (string):  pattern: "^[a-f0-9]{64}$"

### action.type = "repost"

- action.type (string; required):  const: "repost"
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.txid (string; required):  pattern: "^[a-f0-9]{64}$"
- action.context (object):  
- action.context.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.context.value (string; required):  minLength: 1; maxLength: 2048
- action.subcontext (object):  
- action.subcontext.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.subcontext.value (string; required):  minLength: 1; maxLength: 2048

### action.type = "like" | "unlike"

- action.type ("like" | "unlike"; required):  
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.txid (string; required):  pattern: "^[a-f0-9]{64}$"
- action.emoji (string):  minLength: 1; maxLength: 32

### action.type = "follow" | "unfollow" | "unfriend"

- action.type ("follow" | "unfollow" | "unfriend"; required):  
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.bapId (string; required):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"

### action.type = "friend"

- action.type (string; required):  const: "friend"
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.bapId (string; required):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- action.publicKey (string; required): Your communication public key, from the existing wallet/key-agreement workflow. This record does not establish encryption by itself. pattern: "^(02|03)[a-f0-9]{64}$"

### action.type = "message"

- action.type (string; required):  const: "message"
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.content (string; required):  minLength: 1; maxLength: 400000
- action.contentType (string):  default: "text/plain"; maxLength: 128; pattern: "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
- action.encoding ("utf8" | "base64"): Input encoding. Base64 is decoded to binary B content. default: "utf8"
- action.filename (string):  maxLength: 255
- action.context (object):  
- action.context.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.context.value (string; required):  minLength: 1; maxLength: 2048
- action.subcontext (object):  
- action.subcontext.key (string; required):  minLength: 1; maxLength: 64; pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
- action.subcontext.value (string; required):  minLength: 1; maxLength: 2048
- action.tags (array of string):  maxItems: 50
- action.attachments (array of object):  maxItems: 8
- action.attachments[].content (string; required):  minLength: 1; maxLength: 400000
- action.attachments[].contentType (string):  default: "text/plain"; maxLength: 128; pattern: "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
- action.attachments[].encoding ("utf8" | "base64"): Input encoding. Base64 is decoded to binary B content. default: "utf8"
- action.attachments[].filename (string):  maxLength: 255

### action.type = "video"

- action.type (string; required):  const: "video"
- action.app (string):  default: "bsv-mcp"; minLength: 1; maxLength: 100
- action.provider (string; required):  minLength: 1; maxLength: 100
- action.videoID (string; required):  minLength: 1; maxLength: 512
- action.channel (string):  minLength: 1; maxLength: 256
- action.duration (number):  minimum: 0
- action.start (number):  minimum: 0

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "action": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "post"
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "content": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400000
            },
            "contentType": {
              "default": "text/plain",
              "type": "string",
              "maxLength": 128,
              "pattern": "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
            },
            "encoding": {
              "default": "utf8",
              "description": "Input encoding. Base64 is decoded to binary B content.",
              "type": "string",
              "enum": [
                "utf8",
                "base64"
              ]
            },
            "filename": {
              "type": "string",
              "maxLength": 255
            },
            "context": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            },
            "subcontext": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            },
            "tags": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            },
            "attachments": {
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400000
                  },
                  "contentType": {
                    "default": "text/plain",
                    "type": "string",
                    "maxLength": 128,
                    "pattern": "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
                  },
                  "encoding": {
                    "default": "utf8",
                    "description": "Input encoding. Base64 is decoded to binary B content.",
                    "type": "string",
                    "enum": [
                      "utf8",
                      "base64"
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            },
            "replyTo": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "type",
            "content"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "repost"
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "context": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            },
            "subcontext": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "txid"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "like",
                "unlike"
              ]
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "emoji": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            }
          },
          "required": [
            "type",
            "txid"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "follow",
                "unfollow",
                "unfriend"
              ]
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            }
          },
          "required": [
            "type",
            "bapId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "friend"
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "publicKey": {
              "type": "string",
              "pattern": "^(02|03)[a-f0-9]{64}$",
              "description": "Your communication public key, from the existing wallet/key-agreement workflow. This record does not establish encryption by itself."
            }
          },
          "required": [
            "type",
            "bapId",
            "publicKey"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "message"
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "content": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400000
            },
            "contentType": {
              "default": "text/plain",
              "type": "string",
              "maxLength": 128,
              "pattern": "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
            },
            "encoding": {
              "default": "utf8",
              "description": "Input encoding. Base64 is decoded to binary B content.",
              "type": "string",
              "enum": [
                "utf8",
                "base64"
              ]
            },
            "filename": {
              "type": "string",
              "maxLength": 255
            },
            "context": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            },
            "subcontext": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            },
            "tags": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            },
            "attachments": {
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400000
                  },
                  "contentType": {
                    "default": "text/plain",
                    "type": "string",
                    "maxLength": 128,
                    "pattern": "^[\\w.+-]+\\/[\\w.+-]+(?:;[^\\r\\n]*)?$"
                  },
                  "encoding": {
                    "default": "utf8",
                    "description": "Input encoding. Base64 is decoded to binary B content.",
                    "type": "string",
                    "enum": [
                      "utf8",
                      "base64"
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "content"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "video"
            },
            "app": {
              "default": "bsv-mcp",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "provider": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "videoID": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "channel": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "duration": {
              "type": "number",
              "minimum": 0
            },
            "start": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "type",
            "provider",
            "videoID"
          ],
          "additionalProperties": false
        }
      ]
    },
    "preview": {
      "default": false,
      "description": "Return unsigned output scripts without signing, funding, or broadcasting.",
      "type": "boolean"
    }
  },
  "required": [
    "action"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}
```

[All tools](https://bsvmcp.com/docs/tools)