Search loads only when you use it. Browse all categories below.

MCP tool

Prepare image placement previews locally

sosoapi_prepare_asset_images

Make 1–4 bounded crop, pad or same-ratio resize JPEG previews from one authorized Workspace image. Static PNG/JPEG only, at most 20 MiB and 8 megapixels. Returns local files, dimensions, warnings and provenance. Review the exact files before saving with sosoapi_upload_asset and the returned upload_arguments. Does not publish.

Read as Markdown

Profiles and transports

Profiles: core, full · Transports: stdio

Choose core or full to control which tools your client sees; this does not change its permissions. Local file upload requires stdio and is unavailable over HTTP. Set SOSOAPI_OUTPUT_SCHEMAS=1 to include output schemas in discovery. Tools return structured results with or without that setting.

Permissions and side effects

Annotations help clients describe a tool. Each call still checks the user’s authentication, role, resource access and capability grants.

{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}

Input fields

Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.

Input fields
Field / branchType / requiredConstraints
$objectRequired in parent
  • additionalProperties: false
workspace_idstringRequired in parent
  • format: "uuid"
source_asset_idintegerRequired in parent
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
outputsarrayRequired in parent
  • minItems: 1
  • maxItems: 4
outputs[]objectOptional / item
  • additionalProperties: false
outputs[].versionnumberRequired in parent
  • enum: [1]
outputs[].destinationstringRequired in parent
  • enum: ["facebook-feed-square","facebook-feed-landscape","instagram-feed-square","instagram-feed-portrait"]
outputs[].operationstringRequired in parent
  • enum: ["crop","pad","resize"]
outputs[].focal_pointobjectRequired in parent
  • additionalProperties: false
outputs[].focal_point.xnumberRequired in parent
  • minimum: 0
  • maximum: 1
outputs[].focal_point.ynumberRequired in parent
  • minimum: 0
  • maximum: 1
outputs[].backgroundstringRequired in parent
  • pattern: "^#[0-9a-fA-F]{6}$"
Complete JSON Schema
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid"
    },
    "source_asset_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "outputs": {
      "minItems": 1,
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "destination": {
            "type": "string",
            "enum": [
              "facebook-feed-square",
              "facebook-feed-landscape",
              "instagram-feed-square",
              "instagram-feed-portrait"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "crop",
              "pad",
              "resize"
            ]
          },
          "focal_point": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "x",
              "y"
            ],
            "additionalProperties": false
          },
          "background": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          }
        },
        "required": [
          "version",
          "destination",
          "operation",
          "focal_point",
          "background"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "workspace_id",
    "source_asset_id",
    "outputs"
  ],
  "additionalProperties": false
}

Structured output

This schema describes structuredContent in a successful tool result. The MCP response also includes content and may set isError when a call fails. For publishing, read the post’s final result rather than treating an accepted request or text response as confirmation. The linked API operation explains permissions and retry rules.

Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.

Structured output
Field / branchType / requiredConstraints
$objectRequired in parent
  • additionalProperties: {}
stagestringRequired in parent
  • enum: ["ready","failed"]
output_directorystringOptional / item—
manifest_pathstringOptional / item—
preview_pathstringOptional / item—
retryablebooleanOptional / item—
$.*any JSON valueOptional / item—
Complete JSON Schema
{
  "type": "object",
  "properties": {
    "stage": {
      "type": "string",
      "enum": [
        "ready",
        "failed"
      ]
    },
    "output_directory": {
      "type": "string"
    },
    "manifest_path": {
      "type": "string"
    },
    "preview_path": {
      "type": "string"
    },
    "retryable": {
      "type": "boolean"
    }
  },
  "required": [
    "stage"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}

Example tool call

These examples use fictional values checked against the schemas. Replace the IDs with ones you are authorized to use, the media with ready assets and the dates with your confirmed publishing time. Check the account’s eligibility before submitting a write. This page sends no API requests.

{
  "name": "sosoapi_prepare_asset_images",
  "arguments": {
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "source_asset_id": 42,
    "outputs": [
      {
        "version": 1,
        "destination": "facebook-feed-square",
        "operation": "pad",
        "focal_point": {
          "x": 0.5,
          "y": 0.5
        },
        "background": "#ffffff"
      }
    ]
  }
}

structuredContent

{
  "stage": "ready",
  "output_directory": "/tmp/sosoapi-preparation-example",
  "manifest_path": "/tmp/sosoapi-preparation-example/manifest.json",
  "preview_path": "/tmp/sosoapi-preparation-example/preview.html",
  "images": [
    {
      "file_path": "/tmp/sosoapi-preparation-example/01-facebook-feed-square.jpg",
      "width": 1080,
      "height": 1080,
      "cropped": false,
      "upscaled": false
    }
  ]
}
Install or connect MCP