Skip to content

Talk: expose create_conversation as an MCP tool (one-to-one / group) #1166

Description

@commercedeployer

Summary

Please expose creating a Talk conversation as an MCP tool.

The HTTP client already implements this (TalkClient.create_conversation), but it is intentionally not registered in configure_talk_tools. Agents that only have Talk MCP tools can list rooms and send messages, yet cannot start a new one-to-one or group conversation. For multi-user / multi-agent setups that is a core Talk capability, not an edge case.

Current state (verified on v0.150.0 / image based on this package)

MCP Talk tools today

  • talk_list_conversations
  • talk_get_conversation
  • talk_get_messages
  • talk_list_participants
  • talk_send_message
  • talk_mark_as_read

Client already has (not an MCP tool)

async def create_conversation(
    *,
    room_type: int = 2,
    room_name: str,
    invite: str | None = None,
) -> TalkConversation:
    """Create a new conversation (used for tests/fixtures).
    ...
    This client method is not exposed as an MCP tool in the initial
    Talk integration; it exists so integration tests can spin up
    scratch rooms.
    """

(room_type: 1 = one-to-one, 2 = group, 3 = public)

So the OCS call path exists; only the MCP surface is missing.

Why this matters

Without a create tool, an agent can only post into rooms whose tokens it already knows (from talk_list_conversations or a human).

That forces operators to pre-create every conversation the agent might need:

  • Owner ↔ each bot
  • Bot ↔ bot (pairwise DMs)

Pairwise rooms grow roughly as n(n−1)/2. That does not scale for an office of many Talk identities (humans + agents). Agents should be able to open a DM or group when the workflow requires it—the same way a person does in the Talk UI.

talk_send_message without create is like “reply in existing chats only.” Starting a conversation is basic Talk UX.

Proposed MCP tool

Something like:

talk_create_conversation

Arg Meaning
room_type 1 one-to-one, 2 group, 3 public
room_name Display name (required for group/public; for 1:1 follow Talk/OCS rules)
invite User id (or group id) to invite at creation — essential for one-to-one

Returns: conversation object including token, so the agent can immediately call talk_send_message.

Implementation can wrap the existing client method; scopes should match other Talk write tools (e.g. talk.write if that is the convention).

Optional follow-ups (separate issues OK):

  • invite participant into an existing room
  • delete conversation (client already has delete_conversation for tests)

Ask

Please promote create_conversation from “test helper only” to a first-class Talk MCP tool in a near release. Happy to review a PR or adjust the tool schema if you have naming/scope preferences.

Thanks for maintaining this—releases are frequent and the rest of the Talk surface is solid; create is the missing piece for agent-driven Talk.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions