Skip to content

Add Nextcloud Talk tools#3

Open
bigcat88 wants to merge 3 commits intomainfrom
feature/p2-talk-tools
Open

Add Nextcloud Talk tools#3
bigcat88 wants to merge 3 commits intomainfrom
feature/p2-talk-tools

Conversation

@bigcat88
Copy link
Contributor

Summary

Adds 8 new MCP tools for Nextcloud Talk (Phase 2):

READ tools:

  • list_conversations — list all conversations with unread counts, types, activity
  • get_conversation — get details for a specific conversation by token
  • get_messages — retrieve chat messages (newest first, configurable limit)
  • get_participants — list participants with roles (owner/moderator/user/guest)

WRITE tools:

  • send_message — send chat messages (Markdown, replies, UTF-8)
  • create_conversation — create group or public conversations

DESTRUCTIVE tools:

  • delete_message — delete a chat message (replaced with system message)
  • leave_conversation — leave a conversation

All tools follow the established patterns: permission decorators, JSON return values, formatted output with only the most useful fields from the API response.

Tests: 44 new integration tests covering:

  • All CRUD operations against live Nextcloud
  • Message ordering, system messages, replies
  • Conversation types (group vs public)
  • Permission enforcement (READ/WRITE/DESTRUCTIVE boundaries)
  • Error cases (nonexistent tokens, invalid room types)
  • UTF-8 and Markdown content

Total test count: 153 (26 unit + 127 integration)

Verified against

  • Nextcloud master (Talk 24.0.0-dev) — 153/153 passing
  • Nextcloud stable33 (Talk 23.0.2) — 127/127 integration passing
  • ruff check, ruff format, isort — clean
  • pyright strict — 0 errors

Test plan

  • All 44 Talk integration tests pass on NC master
  • All 44 Talk integration tests pass on NC stable33
  • Full test suite (153 tests) passes on NC master
  • Full integration suite (127 tests) passes on NC stable33
  • Lint and type checking clean
  • Existing tests unbroken (test_server.py updated for new tool count)

@bigcat88 bigcat88 marked this pull request as ready for review March 22, 2026 07:22
@bigcat88
Copy link
Contributor Author

Ready for review.

Summary: 8 new Talk tools with 44 integration tests, all passing on NC 31 + NC 32.

Tools added:

Tool Permission Description
list_conversations READ List all conversations with unread counts and activity
get_conversation READ Get details for a conversation by token
get_messages READ Retrieve chat messages (newest first, limit support)
get_participants READ List participants with roles
send_message WRITE Send messages (Markdown, replies, UTF-8)
create_conversation WRITE Create group or public conversations
delete_message DESTRUCTIVE Delete a chat message
leave_conversation DESTRUCTIVE Leave a conversation

CI also fixed: spreed + admin_notifications apps now installed in CI containers.

Total: 20 tools, 153 tests (26 unit + 127 integration).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant