> ## Documentation Index
> Fetch the complete documentation index at: https://docsapi.wiseapp360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute MCP JSON-RPC call

> Executes a JSON-RPC method on the MCP server endpoint.

WiseApp also provides an opt-in multipart HTTP transport extension for local files. Send the complete JSON-RPC request
in the `payload` part and one or more files as `attachments[]`. Multipart uploads are accepted only for
`tools/call` requests targeting `conversation_message_send`, its legacy alias, or `outbound_messages_create`.
Outbound messages accept one file; conversation messages retain their normal attachment limit. Generic MCP
clients do not automatically support this extension.

The `outbound_messages_create` tool also advertises `_meta["openai/fileParams"]` for ChatGPT's native file
picker. JSON clients can provide exactly one `file` descriptor with a temporary HTTPS `download_url` and
`file_id`, a `file_base64` object, or an existing signed ID. Temporary URLs are downloaded through SafeFetch
with HTTPS-only redirects, SSRF protection, and upload-size validation. Invalid, expired, or byte-less signed
IDs return `422 invalid_attachment` before provider delivery.




## OpenAPI

````yaml /openapi/application.json post /mcp/{account_id}/{slug}
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /mcp/{account_id}/{slug}:
    parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
        example: sample
      - name: slug
        in: path
        required: true
        schema:
          type: string
        example: sample
    post:
      tags:
        - MCP
      summary: Execute MCP JSON-RPC call
      description: >
        Executes a JSON-RPC method on the MCP server endpoint.


        WiseApp also provides an opt-in multipart HTTP transport extension for
        local files. Send the complete JSON-RPC request

        in the `payload` part and one or more files as `attachments[]`.
        Multipart uploads are accepted only for

        `tools/call` requests targeting `conversation_message_send`, its legacy
        alias, or `outbound_messages_create`.

        Outbound messages accept one file; conversation messages retain their
        normal attachment limit. Generic MCP

        clients do not automatically support this extension.


        The `outbound_messages_create` tool also advertises
        `_meta["openai/fileParams"]` for ChatGPT's native file

        picker. JSON clients can provide exactly one `file` descriptor with a
        temporary HTTPS `download_url` and

        `file_id`, a `file_base64` object, or an existing signed ID. Temporary
        URLs are downloaded through SafeFetch

        with HTTPS-only redirects, SSRF protection, and upload-size validation.
        Invalid, expired, or byte-less signed

        IDs return `422 invalid_attachment` before provider delivery.
      operationId: post-mcp-account-id-slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                id:
                  type:
                    - integer
                    - string
                    - 'null'
                method:
                  type: string
                params:
                  type: object
                  additionalProperties: true
            examples:
              initialize:
                summary: Initialize MCP session
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: initialize
                  params: {}
              tools_list:
                summary: List tools
                value:
                  jsonrpc: '2.0'
                  id: 2
                  method: tools/list
                  params: {}
              outbound_temporary_file:
                summary: >-
                  Send one outbound file from ChatGPT or another temporary URL
                  client
                value:
                  jsonrpc: '2.0'
                  id: 5
                  method: tools/call
                  params:
                    name: outbound_messages_create
                    arguments:
                      body:
                        inbox_id: 3
                        recipient:
                          phone_number: '+595981123456'
                        message:
                          type: media
                          content: Receipt
                      file:
                        download_url: https://temporary-files.example/receipt.png
                        file_id: file_123
                        mime_type: image/png
                        file_name: receipt.png
              outbound_base64_file:
                summary: >-
                  Send one outbound file through the provider-neutral JSON
                  fallback
                value:
                  jsonrpc: '2.0'
                  id: 6
                  method: tools/call
                  params:
                    name: outbound_messages_create
                    arguments:
                      body:
                        inbox_id: 3
                        recipient:
                          phone_number: '+595981123456'
                        message:
                          type: media
                          content: Receipt
                      file_base64:
                        data: iVBORw0KGgoAAAANSUhEUg...
                        mime_type: image/png
                        file_name: receipt.png
          multipart/form-data:
            schema:
              type: object
              required:
                - payload
                - attachments
              properties:
                payload:
                  type: string
                  description: Complete JSON-RPC 2.0 request serialized as JSON.
                attachments:
                  type: array
                  minItems: 1
                  maxItems: 15
                  description: >-
                    Local files for conversation messages, or one local file for
                    an outbound media message.
                  items:
                    type: string
                    format: binary
            examples:
              multipart_message:
                summary: Send a local file through the WiseApp multipart extension
                description: >-
                  Select one or more local files in Postman before sending the
                  request.
                value:
                  payload: >-
                    {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"conversation_message_send","arguments":{"conversation_id":"42","content":"Caption"}}}
                  attachments:
                    - avatar.png
              multipart_outbound_message:
                summary: Resolve a recipient and send one local file
                description: >-
                  Select one local file; the canonical outbound API retains
                  recipient resolution and delivery behavior.
                value:
                  payload: >-
                    {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"outbound_messages_create","arguments":{"idempotency_key":"outbound-123","body":{"inbox_id":3,"recipient":{"phone_number":"+595981123456","name":"Juan"},"message":{"type":"media","content":"Comprobante"}}}}}
                  attachments:
                    - receipt.pdf
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - jsonrpc
                      - id
                      - result
                    properties:
                      jsonrpc:
                        type: string
                        enum:
                          - '2.0'
                      id:
                        type:
                          - integer
                          - string
                          - 'null'
                      result:
                        type: object
                        additionalProperties: true
                  - type: object
                    required:
                      - jsonrpc
                      - id
                      - error
                    properties:
                      jsonrpc:
                        type: string
                        enum:
                          - '2.0'
                      id:
                        type:
                          - integer
                          - string
                          - 'null'
                      error:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: integer
                          message:
                            type: string
              examples:
                success_initialize:
                  summary: Successful initialize response
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      protocolVersion: '2024-11-05'
                      serverInfo:
                        name: wiseapp-account-mcp-server
                        version: 1.0.0
                      capabilities:
                        tools:
                          listChanged: false
                error_method_not_found:
                  summary: Unknown method
                  value:
                    jsonrpc: '2.0'
                    id: 77
                    error:
                      code: -32601
                      message: Method not found
        '204':
          description: No Content (JSON-RPC notification request)
        '400':
          description: Invalid JSON payload (parse error)
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type:
                      - integer
                      - string
                      - 'null'
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
              example:
                jsonrpc: '2.0'
                id: null
                error:
                  code: -32700
                  message: Parse error
        '401':
          description: Invalid MCP token
          headers:
            WWW-Authenticate:
              description: Bearer challenge with OAuth protected resource metadata URL.
              schema:
                type: string
                example: >-
                  Bearer realm="mcp",
                  resource_metadata="https://chat.wiseapp360.com/.well-known/oauth-protected-resource/mcp/1/support_assistant"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Invalid MCP access token
        '403':
          description: MCP feature disabled for the account
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: MCP server feature is not enabled for this account
        '404':
          description: MCP server slug not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Resource not found

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.