From 9acb1df9cd9bdedcff750f5013a4f649e69613f7 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Tue, 13 Jan 2026 13:00:39 -0500 Subject: [PATCH] feat: make Addie proactively read shared files Previously when users shared text files in Slack, Addie would only see file metadata and wait for an explicit request to read the file. This was frustrating UX - users expected Addie to see what they shared. Changes: - Update read_slack_file tool description to instruct Claude to proactively read files when shared, without waiting to be asked - Add File Handling section to Addie's system prompt with explicit guidance on proactive file reading - Include guidance to inform users if file content is truncated Co-Authored-By: Claude Opus 4.5 --- .changeset/smooth-rice-chew.md | 2 ++ server/src/addie/mcp/url-tools.ts | 4 ++-- server/src/addie/prompts.ts | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/smooth-rice-chew.md diff --git a/.changeset/smooth-rice-chew.md b/.changeset/smooth-rice-chew.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/smooth-rice-chew.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/server/src/addie/mcp/url-tools.ts b/server/src/addie/mcp/url-tools.ts index 887e9ac787..fde6589409 100644 --- a/server/src/addie/mcp/url-tools.ts +++ b/server/src/addie/mcp/url-tools.ts @@ -118,8 +118,8 @@ export const URL_TOOLS: AddieTool[] = [ { name: 'read_slack_file', description: - 'Download and read a file that was shared in Slack. Use this when a user shares a file (PDF, document, text file, etc.) and asks about its contents. Provide the file URL from the shared file info.', - usage_hints: 'use when user shares a file in Slack and asks "what is in this file?", "can you read this?"', + 'Download and read a file that was shared in Slack. PROACTIVELY use this whenever a user shares a file (PDF, document, text file, image, etc.) - don\'t wait to be asked. Users expect you to see what they shared. Provide the file URL from the shared file info.', + usage_hints: 'use IMMEDIATELY when you see "[Shared files]" in a message - read the file proactively', input_schema: { type: 'object', properties: { diff --git a/server/src/addie/prompts.ts b/server/src/addie/prompts.ts index daa6c3258a..b633578279 100644 --- a/server/src/addie/prompts.ts +++ b/server/src/addie/prompts.ts @@ -212,6 +212,9 @@ When users ask about finding help, use search_members to find relevant organizat IMPORTANT: Never tell users to use Slack slash commands - the AAO bot commands are deprecated. Instead, always use the get_account_link tool to generate direct clickable sign-in links. +**File Handling:** +When users share files in Slack, you'll see file metadata like "[Shared files] File: example.txt | Type: TXT | Size: 5 KB | Link: https://...". For text-based files (.txt, .md, .json, .csv, .yaml, .ts, .py, .js, etc.), **proactively use read_slack_file to fetch the content** without waiting to be asked. Users expect you to see what they shared. For PDFs and images, read_slack_file returns the content in a format you can analyze directly. If the file is truncated or cannot be fully read, let the user know. + **GitHub Issue Drafting:** - draft_github_issue: Draft a GitHub issue and generate a pre-filled URL for users to create it