get_channel_by_name
Retrieve a Mattermost channel's metadata, including purpose, header, and member count, using its name and team ID.
Instructions
Get a channel by its name within a team.
Returns channel metadata including name, purpose, header, and member count. Use when you know the channel name but not the ID. For lookup by ID, use get_channel instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"team_id": "<team_id>",
"channel_name": "<channel_name>"
},
"name": "get_channel_by_name"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_id | Yes | 26-character team identifier (e.g., 'o5w8h47pdfbzjc4d8w7dhnhren') | |
| channel_name | Yes | Channel name (lowercase, no spaces) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique channel identifier | |
| name | Yes | URL-friendly channel name | |
| type | Yes | Channel type: O=public, P=private, D=direct, G=group | |
| header | Yes | Channel header text | |
| purpose | Yes | Channel purpose description | |
| team_id | Yes | Team this channel belongs to | |
| create_at | Yes | Creation timestamp in milliseconds | |
| delete_at | Yes | Deletion timestamp (0 if not deleted) | |
| update_at | Yes | Last update timestamp in milliseconds | |
| creator_id | Yes | User ID who created the channel | |
| display_name | Yes | Human-readable channel name | |
| last_post_at | Yes | Timestamp of last post | |
| total_msg_count | Yes | Total message count |