sockdock_test_match
Check which SockDock rule would match a Slack post and what the program would receive, using channel, text, optional user and mention, without posting to Slack.
Instructions
Tells which rule would run for a post with the given text in the given channel, taking the order of rules and rules that are off into account, and what a program would receive as values. Use channel dm for a DM to the Slack app, and mention: true for a post that mentions the Slack app (rules with mention_only need it). Pass user (a member ID) to also skip rules that person may not run; without it, who posts is ignored and allowed_users in the result tells you the matched rule is limited to some people. Use it after creating or changing a rule to check the condition, or when the user asks why a post did or did not trigger a rule. It does not post anything to Slack and does not check whether the channel's posts reach SockDock (use sockdock_check_rule for that).
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": {
"channel": "<channel>",
"text": "<text>"
},
"name": "sockdock_test_match"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the post's text | |
| user | No | the poster's Slack member ID (from sockdock_find_users); rules this person may not run are passed over, as for a real post. Omit to ignore who posts | |
| channel | Yes | channel name (#dev-help or dev-help) or ID; must be in sockdock_list_channels. dm for a DM to the Slack app | |
| mention | No | true when the post mentions the Slack app (@app); rules with mention_only run only then |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | No | ||
| values | No | what the rule would pass to a program (text, or the regular expression's named groups) | |
| matched | Yes | ||
| allowed_users | No | member IDs of the only people who may run the matched rule; a post by anyone else does nothing (or goes to a later rule) |