{
  "service": "mattermost",
  "displayName": "Mattermost",
  "categories": [
    "Communication",
    "Productivity"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Personal Access Token",
      "placeholder": "MATTERMOST_PERSONAL_ACCESS_TOKEN",
      "description": "Mattermost Personal Access Token used with the Authorization: Bearer <token> header. Create or manage tokens from your Mattermost account settings.",
      "extraFields": [
        {
          "key": "instanceUrl",
          "label": "Instance URL",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "https://mattermost.example.com",
          "description": "The root URL for your Mattermost instance. URLs ending in /api/v4 are also accepted."
        }
      ]
    }
  ],
  "homepageUrl": "https://mattermost.com",
  "actions": [
    {
      "id": "mattermost.create_post",
      "service": "mattermost",
      "name": "create_post",
      "description": "Create a Mattermost post in a channel.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string",
            "minLength": 1,
            "description": "A Mattermost object ID."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "description": "The Markdown message body to post."
          },
          "rootId": {
            "type": "string",
            "minLength": 1,
            "description": "Optional root post ID for replying in a thread."
          },
          "props": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Optional Mattermost post props object."
          }
        },
        "additionalProperties": false,
        "required": [
          "channelId",
          "message"
        ],
        "description": "Input parameters for creating a Mattermost channel post."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "post": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Mattermost post object."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for a created Mattermost post."
      }
    },
    {
      "id": "mattermost.get_channel",
      "service": "mattermost",
      "name": "get_channel",
      "description": "Retrieve one Mattermost channel by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string",
            "minLength": 1,
            "description": "A Mattermost object ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving one Mattermost channel."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Mattermost API entity object."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for one Mattermost channel."
      }
    },
    {
      "id": "mattermost.get_current_user",
      "service": "mattermost",
      "name": "get_current_user",
      "description": "Get the Mattermost user associated with the Personal Access Token.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input parameters are required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Mattermost API entity object."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for the current Mattermost user."
      }
    },
    {
      "id": "mattermost.get_team",
      "service": "mattermost",
      "name": "get_team",
      "description": "Retrieve one Mattermost team by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "minLength": 1,
            "description": "A Mattermost object ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving one Mattermost team."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Mattermost API entity object."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for one Mattermost team."
      }
    },
    {
      "id": "mattermost.list_channel_posts",
      "service": "mattermost",
      "name": "list_channel_posts",
      "description": "List Mattermost posts in a channel.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string",
            "minLength": 1,
            "description": "A Mattermost object ID."
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "description": "The zero-based page number to request."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of records to request per page."
          },
          "since": {
            "type": "integer",
            "minimum": 0,
            "description": "Only return posts created after this Unix timestamp in milliseconds."
          },
          "beforePostId": {
            "type": "string",
            "minLength": 1,
            "description": "Return posts before this Mattermost post ID."
          },
          "afterPostId": {
            "type": "string",
            "minLength": 1,
            "description": "Return posts after this Mattermost post ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "channelId"
        ],
        "description": "Query parameters for listing posts in a Mattermost channel. since cannot be used with page, perPage, beforePostId, or afterPostId."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Mattermost post object."
            },
            "description": "Mattermost posts returned by the API in response order."
          },
          "order": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Mattermost object ID."
            },
            "description": "Mattermost post IDs in response order."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for Mattermost channel posts."
      }
    },
    {
      "id": "mattermost.list_team_channels",
      "service": "mattermost",
      "name": "list_team_channels",
      "description": "List public Mattermost channels in a team.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "minLength": 1,
            "description": "A Mattermost object ID."
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "description": "The zero-based page number to request."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of records to request per page."
          }
        },
        "additionalProperties": false,
        "required": [
          "teamId"
        ],
        "description": "Query parameters for listing Mattermost channels in a team."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Mattermost API entity object."
            },
            "description": "Mattermost channels returned by the API."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for Mattermost channels."
      }
    },
    {
      "id": "mattermost.list_user_teams",
      "service": "mattermost",
      "name": "list_user_teams",
      "description": "List Mattermost teams visible to the current user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input parameters are required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Mattermost API entity object."
            },
            "description": "Mattermost teams returned by the API."
          },
          "raw": {
            "description": "The raw Mattermost API JSON response."
          }
        },
        "additionalProperties": false,
        "description": "Output payload for Mattermost teams."
      }
    }
  ]
}
