Skip to content

Conversation

@mwhite42
Copy link

@mwhite42 mwhite42 commented Nov 6, 2025

This PR adds two optional features that may be useful for generating daily activity summaries and end-of-day reports.

Note: This PR is marked as DRAFT as these features are optional enhancements. They may or may not be useful for the broader community. Feel free to close if they don't fit the project's direction.

Features Added

1. filter_mentions_user parameter for conversations_search_messages

  • Find messages that mention specific users
  • Supports @me to find your own mentions
  • Uses Slack's to: search operator
  • Use case: "Show me all messages where I was mentioned today"

2. users_conversations tool

  • Lists all conversations (channels, DMs, group DMs) user is a member of
  • Returns conversation metadata (type, member count, topics)
  • Use case: "Get a complete list of all my active conversations"

Example Daily Summary Workflow

1. Get all my conversations: users_conversations
2. Find messages mentioning me today: 
   - filter_mentions_user: "@me"
   - filter_date_on: "today"
3. Find messages I sent today:
   - filter_users_from: "@username"
   - filter_date_on: "today"

Technical Implementation

  • Added Conversation struct for structured conversation data
  • Enhanced search query builder with to: operator for mentions
  • UsersConversationsHandler retrieves from channel cache

Potential Use Cases

  • End-of-day activity summaries
  • Finding all mentions across workspace
  • Tracking participation in conversations
  • Workspace context awareness

Feedback requested: Are these features valuable for your use case? Happy to close this if they don't align with the project's goals.


🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

mwhite42 and others added 2 commits November 6, 2025 17:05
Implements comprehensive Slack Canvas support with create, read, edit, and sections lookup operations. Includes full support for both OAuth (xoxp) and browser token (xoxc/xoxd) authentication modes.

## Canvas Operations (4 new tools)

1. **canvases_create** - Create canvases with markdown content
   - Supports full markdown formatting (headings, lists, code blocks, tables, mentions, emojis)

2. **canvases_edit** - Edit existing canvases
   - Operations: insert_at_start, insert_at_end, insert_before, insert_after, replace, delete
   - Section-based editing for precise content manipulation

3. **canvases_sections_lookup** - Find section IDs within a canvas
   - Enables targeted edits to specific canvas sections
   - Optional text filtering

4. **canvases_read** - Read full canvas content
   - Returns metadata (title, timestamps, URLs, permissions)
   - Downloads complete markdown content via authenticated HTTP request
   - **NEW**: Full support for both xoxp and xoxc/xoxd authentication

## Technical Implementation

### Dual Authentication Support
- Added httpClient field to MCPSlackClient to store authenticated HTTP client
- OAuth (xoxp): Uses Bearer token authentication in Authorization header
- Browser tokens (xoxc/xoxd): Uses cookie-based authentication via HTTP client
- downloadCanvasContent helper intelligently selects auth method based on token type

### API Extensions
- Added Canvas methods to SlackAPI interface:
  - CreateCanvasContext, EditCanvasContext, LookupCanvasSectionsContext
  - GetFileInfoContext for canvas metadata
- Added Token() and HTTPClient() methods to MCPSlackClient for auth access

### Integration Test Fixes
- Fixed test setup to post messages directly via Slack API
- Added comprehensive logging and cleanup
- Moved setup before test cases definition

## OAuth Scopes Required

New scopes needed for full functionality:
- `canvases:write` - Create and edit canvases
- `canvases:read` - Read canvas content
- `files:read` - Access canvas content via files.info API

## Documentation Updates

- Updated README.md with all 4 Canvas tools
- Added canvas scopes to docs/01-authentication-setup.md
- Updated .gitignore to exclude build artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
This PR adds two features that may be useful for generating daily activity summaries and end-of-day reports. These are optional enhancements and can be considered independently from Canvas operations.

**Note**: This PR is marked as DRAFT as these features may or may not be useful for the broader community. Feedback welcome!

## Features Added

### 1. filter_mentions_user parameter for conversations_search_messages
- Find messages that mention specific users
- Supports `@me` to find your own mentions
- Uses Slack's `to:` search operator
- **Use case**: "Show me all messages where I was mentioned today"

### 2. users_conversations tool
- Lists all conversations (channels, DMs, group DMs) user is a member of
- Returns conversation metadata (type, member count, topics)
- **Use case**: "Get a complete list of all my active conversations"

## Example Daily Summary Workflow

```
1. Get all my conversations: users_conversations
2. Find messages mentioning me today:
   - filter_mentions_user: "@me"
   - filter_date_on: "today"
3. Find messages I sent today:
   - filter_users_from: "@username"
   - filter_date_on: "today"
```

## Technical Implementation

- Added `Conversation` struct for structured conversation data
- Enhanced search query builder with `to:` operator for mentions
- `UsersConversationsHandler` retrieves from channel cache

## Potential Use Cases

- End-of-day activity summaries
- Finding all mentions across workspace
- Tracking participation in conversations
- Workspace context awareness

**Feedback requested**: Are these features valuable for your use case?

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@casim-kraken
Copy link

Those are quite brilliant addition, at the moment I can't even search for messages where I'm tagged. I think it's quite a powerful addition and would love if we could include it

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.

2 participants