Skip to content

Add slack.group.message tool for group conversations #17

@fbraza

Description

@fbraza

Summary

  • add a slack.group.message tool that opens a Slack multiparty DM (conversations_open) when users request messaging several people
  • ensure the tool reuses slack.user.resolve to translate spoken names to user IDs before opening the group DM
  • document the decision to prefer group conversations over sequential individual DMs

Acceptance Criteria

  • tool accepts name list, resolves to unique Slack user IDs, and opens/uses a multiparty DM channel
  • handles existing group DMs by reusing the returned channel ID when appropriate
  • prompt guidance instructs agents to call this tool whenever multiple recipients are requested

Notes

  • Slack MPIM supports up to 8 participants (including the bot); handle or surface errors when exceeding limits
  • consider storing channel IDs in the response so follow-up messages can reuse the same group conversation
  • update voice-agent planning docs to reflect this default behavior

Example

@slack_toolset.tool(name='slack.group.message')
def send_group_message(ctx: RunContext[Deps], params: SlackGroupMessageParams) -> SlackGroupDelivery:
    matches = ctx.deps.tools.call('slack.user.resolve', {'names': params.users})
    user_ids = [m.user_id for m in matches]

    response = ctx.deps.client.conversations_open(users=user_ids)
    channel_id = response['channel']['id']

    post = ctx.deps.client.chat_postMessage(channel=channel_id, text=params.text)
    return SlackGroupDelivery(channel_id=channel_id, ts=post['ts'], members=user_ids)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions