{
  "service": "rocket_chat",
  "displayName": "Rocket.Chat",
  "categories": [
    "Communication",
    "Productivity"
  ],
  "authTypes": [
    "custom_credential"
  ],
  "auth": [
    {
      "type": "custom_credential",
      "fields": [
        {
          "key": "baseUrl",
          "label": "Workspace URL",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "https://chat.example.com",
          "description": "Rocket.Chat workspace URL used as the REST API host. Use the HTTPS URL where your workspace is hosted."
        },
        {
          "key": "userId",
          "label": "User ID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "rbAXPnMktTFbNpwtJ",
          "description": "Rocket.Chat user ID sent with the X-User-Id header."
        },
        {
          "key": "authToken",
          "label": "Auth Token",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "RScctEHSmLGZGywf...",
          "description": "Rocket.Chat auth token sent with the X-Auth-Token header. Generate a personal access token in Rocket.Chat user preferences or obtain it from the login API."
        }
      ],
      "testAction": {
        "actionName": "get_me",
        "input": {}
      }
    }
  ],
  "homepageUrl": "https://www.rocket.chat",
  "actions": [
    {
      "id": "rocket_chat.delete_message",
      "service": "rocket_chat",
      "name": "delete_message",
      "description": "Delete an existing Rocket.Chat message.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "minLength": 1,
            "description": "The room ID where the message is located."
          },
          "msgId": {
            "type": "string",
            "minLength": 1,
            "description": "The message ID to delete."
          },
          "asUser": {
            "type": "boolean",
            "description": "Whether to delete as the user who sent the message."
          }
        },
        "additionalProperties": false,
        "required": [
          "roomId",
          "msgId"
        ],
        "description": "Input parameters for deleting one Rocket.Chat message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "minLength": 1,
            "description": "The deleted message ID."
          },
          "message": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Rocket.Chat object returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": true,
        "description": "Rocket.Chat delete message response."
      }
    },
    {
      "id": "rocket_chat.get_me",
      "service": "rocket_chat",
      "name": "get_me",
      "description": "Get the authenticated Rocket.Chat profile.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input parameters for the Rocket.Chat action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Rocket.Chat object returned by the API."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat profile response."
      }
    },
    {
      "id": "rocket_chat.get_message",
      "service": "rocket_chat",
      "name": "get_message",
      "description": "Get one Rocket.Chat message by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "msgId": {
            "type": "string",
            "minLength": 1,
            "description": "The message ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving one Rocket.Chat message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "_id": {
                "type": "string",
                "minLength": 1,
                "description": "The Rocket.Chat message ID."
              },
              "rid": {
                "type": "string",
                "minLength": 1,
                "description": "The room ID that owns the message."
              },
              "msg": {
                "type": "string",
                "description": "The message text."
              }
            },
            "additionalProperties": true,
            "description": "Rocket.Chat message object returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat message response."
      }
    },
    {
      "id": "rocket_chat.get_room",
      "service": "rocket_chat",
      "name": "get_room",
      "description": "Get metadata for one Rocket.Chat room by ID or name.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "minLength": 1,
            "description": "The room ID. Required if roomName is omitted."
          },
          "roomName": {
            "type": "string",
            "minLength": 1,
            "description": "The room name. Required if roomId is omitted."
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "description": "Whether to include or exclude this field."
            },
            "description": "Rocket.Chat fields projection object. Use 1 to include and 0 to exclude each property."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving one Rocket.Chat room.",
        "anyOf": [
          {
            "required": [
              "roomId"
            ]
          },
          {
            "required": [
              "roomName"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "room": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Rocket.Chat object returned by the API."
          },
          "team": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Rocket.Chat object returned by the API."
          },
          "parent": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Rocket.Chat object returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "required": [
          "room",
          "success"
        ],
        "description": "Rocket.Chat room information response."
      }
    },
    {
      "id": "rocket_chat.list_channel_messages",
      "service": "rocket_chat",
      "name": "list_channel_messages",
      "description": "List messages in a Rocket.Chat public channel.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "minLength": 1,
            "description": "The public channel room ID."
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of messages to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of messages to skip."
          },
          "sort": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "enum": [
                -1,
                1
              ],
              "description": "The sort direction."
            },
            "description": "Rocket.Chat sort object. Use 1 for ascending and -1 for descending."
          },
          "mentionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A mentioned user ID."
            },
            "description": "User IDs that must be mentioned by returned messages."
          },
          "starredIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A user ID for starred-message filtering."
            },
            "description": "User IDs that must have starred returned messages."
          },
          "pinned": {
            "type": "boolean",
            "description": "Whether to return only pinned messages."
          }
        },
        "additionalProperties": false,
        "required": [
          "roomId"
        ],
        "description": "Input parameters for listing Rocket.Chat public channel messages."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Rocket.Chat message ID."
                },
                "rid": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The room ID that owns the message."
                },
                "msg": {
                  "type": "string",
                  "description": "The message text."
                }
              },
              "additionalProperties": true,
              "description": "Rocket.Chat message object returned by the API."
            },
            "description": "Rocket.Chat messages."
          },
          "count": {
            "type": "integer",
            "description": "The number of returned messages."
          },
          "offset": {
            "type": "integer",
            "description": "The response offset."
          },
          "total": {
            "type": "integer",
            "description": "The total number of matching messages."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat channel messages response."
      }
    },
    {
      "id": "rocket_chat.list_rooms",
      "service": "rocket_chat",
      "name": "list_rooms",
      "description": "List Rocket.Chat rooms opened for the authenticated user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "updatedSince": {
            "type": "string",
            "description": "Only return room updates and removals since this ISO date-time.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing opened Rocket.Chat rooms."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "update": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "Rocket.Chat object returned by the API."
            },
            "description": "Rocket.Chat objects returned by the API."
          },
          "remove": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "Rocket.Chat object returned by the API."
            },
            "description": "Rocket.Chat objects returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat rooms response."
      }
    },
    {
      "id": "rocket_chat.post_message",
      "service": "rocket_chat",
      "name": "post_message",
      "description": "Post a message to a Rocket.Chat room, channel, or user target.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "minLength": 1,
            "description": "The room ID, channel name, or username target. Channel names must include the # prefix and usernames can use @."
          },
          "text": {
            "type": "string",
            "description": "The message text to send."
          },
          "parseUrls": {
            "type": "boolean",
            "description": "Whether Rocket.Chat should generate URL previews."
          },
          "alias": {
            "type": "string",
            "description": "Display alias for the message when the user has impersonation permission."
          },
          "avatar": {
            "type": "string",
            "description": "Avatar URL for the message when the user has impersonation permission.",
            "format": "uri"
          },
          "emoji": {
            "type": "string",
            "description": "Emoji avatar for the message when the user has impersonation permission."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "audio_url": {
                  "type": "string",
                  "description": "Audio URL for the attachment.",
                  "format": "uri"
                },
                "author_icon": {
                  "type": "string",
                  "description": "Icon URL displayed next to the author name.",
                  "format": "uri"
                },
                "author_link": {
                  "type": "string",
                  "description": "URL linked from the author name.",
                  "format": "uri"
                },
                "author_name": {
                  "type": "string",
                  "description": "Attachment author name."
                },
                "collapsed": {
                  "type": "boolean",
                  "description": "Whether the attachment should render collapsed."
                },
                "color": {
                  "type": "string",
                  "description": "Attachment accent color."
                },
                "fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The attachment field title."
                      },
                      "value": {
                        "type": "string",
                        "description": "The attachment field value."
                      },
                      "short": {
                        "type": "boolean",
                        "description": "Whether this field should be displayed as a short field."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "title",
                      "value"
                    ],
                    "description": "Rocket.Chat attachment field."
                  },
                  "description": "Attachment fields."
                },
                "image_url": {
                  "type": "string",
                  "description": "Image URL for the attachment.",
                  "format": "uri"
                },
                "message_link": {
                  "type": "string",
                  "description": "URL linked from the attachment timestamp.",
                  "format": "uri"
                },
                "text": {
                  "type": "string",
                  "description": "Attachment text."
                },
                "thumb_url": {
                  "type": "string",
                  "description": "Thumbnail URL for the attachment.",
                  "format": "uri"
                },
                "title": {
                  "type": "string",
                  "description": "Attachment title."
                },
                "title_link": {
                  "type": "string",
                  "description": "URL linked from the attachment title.",
                  "format": "uri"
                },
                "title_link_download": {
                  "type": "boolean",
                  "description": "Whether title_link should download when clicked."
                },
                "ts": {
                  "type": "string",
                  "description": "Attachment timestamp string."
                },
                "video_url": {
                  "type": "string",
                  "description": "Video URL for the attachment.",
                  "format": "uri"
                }
              },
              "additionalProperties": true,
              "description": "Rocket.Chat message attachment."
            },
            "description": "Message attachments."
          },
          "tmid": {
            "type": "string",
            "minLength": 1,
            "description": "The original message ID for a thread reply."
          },
          "customFields": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Custom message fields configured by the workspace."
          }
        },
        "additionalProperties": false,
        "required": [
          "roomId"
        ],
        "description": "Input parameters for posting one Rocket.Chat message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "_id": {
                "type": "string",
                "minLength": 1,
                "description": "The Rocket.Chat message ID."
              },
              "rid": {
                "type": "string",
                "minLength": 1,
                "description": "The room ID that owns the message."
              },
              "msg": {
                "type": "string",
                "description": "The message text."
              }
            },
            "additionalProperties": true,
            "description": "Rocket.Chat message object returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat message response."
      }
    },
    {
      "id": "rocket_chat.update_message",
      "service": "rocket_chat",
      "name": "update_message",
      "description": "Update an existing Rocket.Chat message.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "minLength": 1,
            "description": "The room ID where the message is located."
          },
          "msgId": {
            "type": "string",
            "minLength": 1,
            "description": "The message ID to update."
          },
          "text": {
            "type": "string",
            "description": "The updated message text."
          },
          "previewUrls": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A preview URL.",
              "format": "uri"
            },
            "description": "URLs whose previews should be generated."
          },
          "customFields": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Custom message fields configured by the workspace."
          }
        },
        "additionalProperties": false,
        "required": [
          "roomId",
          "msgId",
          "text"
        ],
        "description": "Input parameters for updating one Rocket.Chat message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "_id": {
                "type": "string",
                "minLength": 1,
                "description": "The Rocket.Chat message ID."
              },
              "rid": {
                "type": "string",
                "minLength": 1,
                "description": "The room ID that owns the message."
              },
              "msg": {
                "type": "string",
                "description": "The message text."
              }
            },
            "additionalProperties": true,
            "description": "Rocket.Chat message object returned by the API."
          },
          "success": {
            "type": "boolean",
            "description": "Whether Rocket.Chat reported success."
          }
        },
        "additionalProperties": false,
        "description": "Rocket.Chat message response."
      }
    }
  ]
}
